CodePudding user response:
Please refer to:Sub test ()
Dim Rng As Range, tRng As Range, bgColor As Long, iColor As Long
Set tRng=Range (" a1: h7 ") "the scope of their definition
BgColor=16777215 'general fill color is white
For Each Rng tRng In
IColor=Rng. Interior. Color
If iColor & lt;> BgColor Then
The Debug. Print Rng. Address (0, 0) & amp; "===& gt;" & IColor
End the If
Next
End Sub
CodePudding user response:
Trouble can help write a function can be run directly complete? This thing completely don't understand, don't know how to modify the code!