Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Conditional Formatting

I have two sheets (Sheet1 and Sheet2). In each sheet I
have a range with data (A1:Z23). I have several cells on
each page conditionally formatted to change to red if
certain things happen. When the person using the file is
done they hit a "complete button" embedded on the page.

I would like VBA code that looks at Sheet1 Range A1:Z23
and Sheet2 Range A1:Z23 and will find any cells of which
have been changed to red due to the conditional formatting
being triggered. If no cells are red, then nothing. If
any cell is red then there would be a VBA OKOnly message
box saying, "Please look for the error".
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,441
Default Conditional Formatting

Shawn,

AFAIK, there is no programatic way to determine when the conditional
formatting has been applied.

The easiest way for you would be to link the conditional formatting to a
formula referencing a cell rather than using the "Cell Value is" option.

For example, if you wanted to color cell A1 red when it's value was greater
than 10, say, you could use this formula in cell B1

=A110

and in the conditional formatting for cell A1, use the "Formula is" option,
with the formula:

=B1

Set your formatting as normally, then in your code, you could check all of
the other cells (B1 in this example) for TRUE and use that as the trigger of
your message box.

HTH,
Bernie
MS Excel MVP

"Shawn" wrote in message
...
I have two sheets (Sheet1 and Sheet2). In each sheet I
have a range with data (A1:Z23). I have several cells on
each page conditionally formatted to change to red if
certain things happen. When the person using the file is
done they hit a "complete button" embedded on the page.

I would like VBA code that looks at Sheet1 Range A1:Z23
and Sheet2 Range A1:Z23 and will find any cells of which
have been changed to red due to the conditional formatting
being triggered. If no cells are red, then nothing. If
any cell is red then there would be a VBA OKOnly message
box saying, "Please look for the error".



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
How can I convert conditional formatting into explicit formatting? Patrick Harris Excel Discussion (Misc queries) 0 April 9th 09 12:00 AM
Formatting Conditional Formatting Icon Sets The Rook[_2_] Excel Discussion (Misc queries) 3 March 7th 09 08:48 PM
Formatting cells in a column with conditional formatting? shamor Excel Discussion (Misc queries) 8 May 19th 08 10:11 PM
Protect Cell Formatting including Conditional Formatting Mick Jennings Excel Discussion (Misc queries) 5 November 13th 07 05:32 PM
Conditional Formatting that will display conditional data BrainFart Excel Worksheet Functions 1 September 13th 05 05:45 PM


All times are GMT +1. The time now is 07:46 PM.

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"