'-抓Data日期=檔案日期,將工作表的第1列號碼指定的字顏和底色------列42
Set BK = ThisWorkbook
Set xF = Nothing
T = Format(Left(Right(A, 15), 10), "yyyy/m/d") & ChrW(160) '搜尋檔案日期
Set xF = BK.Sheets("DATA").Range("A:A").Find(T, Lookat:=xlPart) '搜尋=A欄日期
If Not xF Is Nothing Then
For V = 4 To 10
If xF(1, V) <> "" Then
[B1:AX1].Find(xF(1, V), Lookat:=xlWhole).Font.ColorIndex = IIf(V = 10, 3, 7) '將=A欄日期列的第1列的號碼標示字顏
End If
If xF(2, V) <> "" Then
[B1:AX1].Find(xF(2, V), Lookat:=xlWhole).Interior.ColorIndex = IIf(V = 10, 8, 6) '將=(A欄日期列+1列)的第1列的號碼標示底色
End If
Next V
End If '列56作者: n7822123 時間: 2020-12-5 02:21