永发信息网

mac 高亮显示EXCEL活动单元格?

答案:1  悬赏:40  手机版
解决时间 2021-02-26 02:39
  • 提问者网友:焚苦与心
  • 2021-02-25 15:09
如题
http://www.officezu.com/a/excel/1984.html
我想在我的MAC版的Excel上实现这样的功能.
有没有大神出来救一下我这个弱小的心灵?
我的时Mac版2011Office Excel.
最佳答案
  • 五星知识达人网友:英雄的欲望
  • 2021-02-25 16:37
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
'选中单元格所在行高亮显示(全空时不显示)
Dim a As String
Cells.FormatConditions.Delete
With Target.EntireColumn 'entire全部
a = .Address
.FormatConditions.Delete
.FormatConditions.Add Type:=xlExpression, Formula1:="=counta(" & a & ")>0"
.FormatConditions(1).Font.Bold = True
.FormatConditions(1).Interior.ColorIndex = 6
End With
With Target.EntireRow
a = .Address
.FormatConditions.Delete
.FormatConditions.Add Type:=xlExpression, Formula1:="=counta(" & a & ")>0"
.FormatConditions(1).Font.Bold = True
.FormatConditions(1).Interior.ColorIndex = 17
End With
End Sub
我要举报
如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
点此我要举报以上问答信息
大家都在看
推荐资讯