【发布时间】:2018-10-04 05:24:21
【问题描述】:
目的是根据列标题突出显示非日期单元格。
(高亮屏幕截图单元格 C3,c5,D2,D6)
以下代码我尝试为此目的工作但失败了。 请帮忙看看我能改变什么?
Sub colortest()
Dim MyPage As Range, currentCell As Range
With Sheets(2).Rows(1)
Set t = .Find("Cut Date", lookat:=xlPart)
Set A = Columns(t.Column).EntireColumn
For Each currentCell In A
If Not IsEmpty(currentCell) Then
Select Case Not IsDate(currentCell.Value)
Case 1
currentCell.Interior.Color = 56231
End Select
End If
Next currentCell
End With
End Sub
【问题讨论】: