Check for the existence of conditional formatting

  • Thread starter Thread starter jh
  • Start date Start date
J

jh

I have a mixture of 2003 / 2007 workbooks, and want to check for the
existence of condionally formatted cells using VBA, something
like .....


For each cell in used.range.cells
 
Sorry (pressed send by accident) ...

For each cell in usedrange.cells
if cell.formatting = conditional then
msgbox cell.addresss & " is condionally formatted"
end if
Next

(Obviously the above code doesn't work, but merely describes what I'm
trying to achieve)

Any assistance appreciated
Thanks
John
 
You sure you want to pop up a msgbox for each cell?

For Each cell In ActiveSheet.UsedRange.Cells
If cell.FormatConditions.Count > 0 Then
MsgBox cell.Address & " is conditionally formatted"
End If
Next


Gord Dibben MS Excel MVP
 
You sure you want to pop up a msgbox for each cell?

For Each cell In ActiveSheet.UsedRange.Cells
    If cell.FormatConditions.Count > 0 Then
        MsgBox cell.Address & " is conditionally formatted"
   End If
Next

Gord Dibben  MSExcelMVP

Perfect ...thank you Gordon!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top