Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I want to if I can tell conditianl formatting is turned on in the VBA?
Thanks. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How can I convert conditional formatting into explicit formatting? | Excel Discussion (Misc queries) | |||
Formatting cells in a column with conditional formatting? | Excel Discussion (Misc queries) | |||
Protect Cell Formatting including Conditional Formatting | Excel Discussion (Misc queries) | |||
conditional Formatting based on cell formatting | Excel Worksheet Functions | |||
Conditional Formatting that will display conditional data | Excel Worksheet Functions |