Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
jh jh is offline
external usenet poster
 
Posts: 9
Default Check for the existence of conditional formatting

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
jh jh is offline
external usenet poster
 
Posts: 9
Default Check for the existence of conditional formatting

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
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default Check for the existence of conditional formatting

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




On Thu, 18 Feb 2010 08:15:04 -0800 (PST), jh wrote:

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


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default Check for the existence of conditional formatting

Forgot to mention.

You can also check for CF on a sheet by F5SpecialCF


Gord

On Thu, 18 Feb 2010 12:50:11 -0800, Gord Dibben <gorddibbATshawDOTca wrote:

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




On Thu, 18 Feb 2010 08:15:04 -0800 (PST), jh wrote:

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


  #5   Report Post  
Posted to microsoft.public.excel.programming
jh jh is offline
external usenet poster
 
Posts: 9
Default Check for the existence of conditional formatting

On 18 Feb, 20:50, Gord Dibben <gorddibbATshawDOTca wrote:
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

On Thu, 18 Feb 2010 08:15:04 -0800 wrote:
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


Perfect ...thank you Gordon!
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Range existence check DoctorG Excel Programming 6 July 13th 06 04:31 PM
Check for existence CWillis Excel Discussion (Misc queries) 3 May 31st 06 01:20 PM
VBA to check for existence of a DSN GPO Excel Programming 2 May 29th 06 05:22 AM
How do I check for existence of a worksheet? LizzieHW Excel Worksheet Functions 1 July 19th 05 06:22 PM
Code to check existence No Name Excel Programming 2 November 4th 04 01:50 PM


All times are GMT +1. The time now is 02:03 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"