PDA

View Full Version : Cell format verification



lucasnutz
10-24-2011, 06:17 AM
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!

mdmackillop
10-24-2011, 12:40 PM
Welcome to VBAX
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