PC Review


Reply
Thread Tools Rate Thread

Check for the existence of conditional formatting

 
 
jh
Guest
Posts: n/a
 
      18th Feb 2010
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
 
Reply With Quote
 
 
 
 
jh
Guest
Posts: n/a
 
      18th Feb 2010
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
 
Reply With Quote
 
Gord Dibben
Guest
Posts: n/a
 
      18th Feb 2010
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 <(E-Mail Removed)> 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


 
Reply With Quote
 
Gord Dibben
Guest
Posts: n/a
 
      18th Feb 2010
Forgot to mention.

You can also check for CF on a sheet by F5>Special>CF


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 <(E-Mail Removed)> 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


 
Reply With Quote
 
jh
Guest
Posts: n/a
 
      19th Feb 2010
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 (PST),jh<g...@4v1.co.uk> 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 With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Conditional Formatting to Check for Blanks Daren Microsoft Excel Worksheet Functions 5 15th Oct 2008 11:14 PM
Please check my code for conditional formatting Conan Kelly Microsoft Excel Programming 2 28th Jul 2006 01:11 AM
conditional formatting via check box cedtech23 Microsoft Excel Programming 1 20th Jul 2006 04:19 AM
check box conditional formatting =?Utf-8?B?Si4gRGF2aXM=?= Microsoft Access Reports 4 20th Apr 2006 12:35 AM
Check box & conditional formatting =?Utf-8?B?QnJlbnQ=?= Microsoft Excel Misc 4 10th Jan 2006 05:43 AM


Features
 

Advertising
 

Newsgroups
 


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