Hi guys,
I need to make a sub to verify if a set of cells has changed format regarding another cell (like the sample cell format).
I haven't seen anything that lets me do this in terms of code. Perhaps someone could help me.
thanks!
Hi guys,
I need to make a sub to verify if a set of cells has changed format regarding another cell (like the sample cell format).
I haven't seen anything that lets me do this in terms of code. Perhaps someone could help me.
thanks!
Welcome to VBAX
[vba]Sub Formats()
Dim cel As Range
For Each cel In Selection
If cel.NumberFormat <> Range("A1").NumberFormat Then
cel.Interior.ColorIndex = 6
End If
Next
End Sub
[/vba]
MVP (Excel 2008-2010)
Post a workbook with sample data and layout if you want a quicker solution.
To help indent your macros try Smart Indent
Please remember to mark threads 'Solved'