回復 1#ziv976688
[attach]30748[/attach] 有節錄准提版主的程式碼,並將其放置 :
在列6~列8插入
Dim T$, V%
Dim BK As Workbook, xB As Workbook, xS As Worksheet, xF As Range
Set BK = ThisWorkbook
在列29~列40插入
'-抓日期,號碼填黃色---------------------------------
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
xS.[B1:AX1].Find(xF(1, V), Lookat:=xlWhole).Interior.ColorIndex = IIf(V = 10, 38, 6) '顯示=A欄日期+1列的號碼
xB.Sheets(1).[B1:AX1].Find(xF(1, V), Lookat:=xlWhole).Interior.ColorIndex = IIf(V = 10, 38, 6)
End If
Next V
End If