Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Is there is a way to tell conditional formatting is on?

I want to if I can tell conditianl formatting is turned on in the VBA?
Thanks.


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Is there is a way to tell conditional formatting is on?

Hi

If range("A1").FormatConditions.Count 0 then
msgbox "conditional formating applied for cell A1"
end if


--
Regards
Frank Kabel
Frankfurt, Germany

luvgreen wrote:
I want to if I can tell conditianl formatting is turned on in the

VBA?
Thanks.


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default Is there is a way to tell conditional formatting is on?

Thank you for reply. I did not express my question well. Let me explain it with an example.

For cell A1 I put condition formatting of if A1=1, then shade the cell in red. I want to know if the cell is turned red or not. Thanks.
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,624
Default Is there is a way to tell conditional formatting is on?

Since you know the condition, just use that:

Dim CFisOn As Boolean
CFisOn = Range("A1").Value = 1



In article ,
"luvgreen" wrote:

Thank you for reply. I did not express my question well. Let me explain it
with an example.

For cell A1 I put condition formatting of if A1=1, then shade the cell in
red. I want to know if the cell is turned red or not. Thanks.

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default Is there is a way to tell conditional formatting is on?

Thank you for all replies. In my case, many cells have different conditional formattings. Is there a way to tell that any of the conditional formattting is on? I am sorry to keep repeating this question.

I tired to use the range.interior.colorindex to see if the color is changed, but it seems the interior color did not change even when the conditional formatting is on. How can I tell the color is changed in the cell from the code which going through each cell with the conditions applied to the cell? Thanks a lot.


  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Is there is a way to tell conditional formatting is on?

Hi
Unfortunately you cannot check the conditional format color. So AFAIK
you have to 're-code' all your conditions for all cells in VBA to check
whether a condition is evaluated to True or False.

--
Regards
Frank Kabel
Frankfurt, Germany

luvgreen wrote:
Thank you for all replies. In my case, many cells have different
conditional formattings. Is there a way to tell that any of the
conditional formattting is on? I am sorry to keep repeating this
question.

I tired to use the range.interior.colorindex to see if the color is
changed, but it seems the interior color did not change even when the
conditional formatting is on. How can I tell the color is changed in
the cell from the code which going through each cell with the
conditions applied to the cell? Thanks a lot.


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 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 based on cell formatting Totom Excel Worksheet Functions 0 January 15th 07 04:35 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:05 AM.

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

About Us

"It's about Microsoft Excel"