乔山办公网我们一直在努力
您的位置:乔山办公网 > office365 > excel如何设置点击任意一个单元格会出现一个十字架标明所点...

excel如何设置点击任意一个单元格会出现一个十字架标明所点...

作者:乔山办公网日期:

返回目录:office365


1、首先打开excel表格,在表格上方的工具栏中找到“视图”选项。

2、点击进入“视图”后,找到其中的“阅读模式”选项。

3、然后点击“阅读模式”的下拉菜单,选择需要高亮显示zd的颜色,例如选择黄色。

4、选择后点击页面中任意单元格,可以看到横行和竖列都会显示同一颜色的高亮。



按ALT+F11,输入如下代码(建议复制粘贴,不易出现手误):

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    If Target.EntireColumn.Address = Target.Address Then
        Cells.Interior.ColorIndex = xlNone
        Exit Sub
    End If
    If Target.EntireRow.Address = Target.Address Then
        Cells.Interior.ColorIndex = xlNone
        Exit Sub
    End If
    Cells.Interior.ColorIndex = xlNone
    Rows(Selection.Row & ":" & Selection.Row + Selection.Rows.Count - 1).Interior.ColorIndex = 10
    Columns(Selection.Column).Resize(, Selection.Columns.Count).Interior.ColorIndex = 10
End Sub

自己可以改ColorIndex,直到出现满意的颜色。以下是截7a686964616fe4b893e5b19e332图:


右键zhidao当前工作表名称(下方的标签)---查看代码--把下列代码复制进去即可!
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
With Target
.Parent.Cells.Interior.ColorIndex = xlNone
.EntireRow.Interior.Color = vbGreen
.EntireColumn.Interior.Color = vbCyan
.Interior.Color = vbRed
End With
End Sub

Alt+F11打开VBE编辑器,双击对应的工作表对象,复制粘贴下面的代码后,在工作表中选中单元格zd时显示带颜色的十字。

Private Sub Worksheet_SelectionChange(ByVal Target As Range)

    Cells.Interior.ColorIndex = xlColorIndexNone

    With Target

        .EntireRow.Interior.Color = vbBlue

        .EntireColumn.Interior.Color = vbBlue

    End With

End Sub

相关阅读

  • wps <em>office</em> <em>excel</em> 中

  • 乔山办公网office365
  • 建议以一个为主。因为两个软件对一些格式的解释不尽相同。wps是兼容office,但是格式上不完全兼容,数据能读过来,但是函数有的还不支持。同样的,wps的一些函数,office也没有。o
  • -excel 十字光标,excel横竖十字光标

  • 乔山办公网excel表格制作
  • 1、电脑打开Excel表格,然后点击左上角的文件。copy2、点击进入文件页面,点击左下角的选项。百3、进入Excel选项页面,点击左侧的高级。4、进入高级页面,把启用度填充柄和单元格拖
关键词不能为空
极力推荐

ppt怎么做_excel表格制作_office365_word文档_365办公网