excel表格中,怎么设置,点一个格子,它所在的行和列都有颜色?
4个回答
展开全部
WPS中的“视图”中,有“阅读”模式,选择后,点击任一单元格,所在行或列都会变色,Excel没有这样的功能,除非进行VBA编程设置。
本回答被网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
在查看代码复制以下:
Private Sub Worksheet_Change(ByVal Target As Range)
If Application.CutCopyMode <> False Then
Application.CutCopyMode = False
End If
Call colorset(Target)
End Sub
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Application.CutCopyMode = False Then
Call colorset(Target)
Else
Exit Sub
End If
End Sub
Private Sub colorset(ByVal rngtarget As Range)
If rngtarget.Count > 1 Then
Cells.Interior.ColorIndex = 0
Exit Sub
End If
Rows.Interior.ColorIndex = 0
x = ActiveCell.Row
y = ActiveCell.Column
Rows(x).Interior.ColorIndex = 20
Columns(y).Interior.ColorIndex = 35
ActiveCell.Interior.ColorIndex = 15
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
If Application.CutCopyMode <> False Then
Application.CutCopyMode = False
End If
Call colorset(Target)
End Sub
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Application.CutCopyMode = False Then
Call colorset(Target)
Else
Exit Sub
End If
End Sub
Private Sub colorset(ByVal rngtarget As Range)
If rngtarget.Count > 1 Then
Cells.Interior.ColorIndex = 0
Exit Sub
End If
Rows.Interior.ColorIndex = 0
x = ActiveCell.Row
y = ActiveCell.Column
Rows(x).Interior.ColorIndex = 20
Columns(y).Interior.ColorIndex = 35
ActiveCell.Interior.ColorIndex = 15
End Sub
本回答被网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询