請測試看看,謝謝
Sub test()
Dim xR As Range, R%, MyClr
For Each xR In Range([h1], Cells(Rows.Count, 2).End(3))
MyClr = xR.DisplayFormat.Interior.ColorIndex
If MyClr <> -4142 Then
R = xR.Row
Cells(R, 9) = Cells(R, 9) + xR
End If
Next
End Sub作者: john2006168 時間: 2022-5-24 16:57