Home > Software engineering >  Excel macro will be marked with the color cell coordinates in another sheet
Excel macro will be marked with the color cell coordinates in another sheet

Time:10-11

How will be marked with the color sheet cell coordinates are displayed, please prawns help cool people to write a macro function, specific see the screenshot below!

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!
  •  Tags:  
  • VBA
  • Related