Conditional formatting based on conditional formatting -XL02

bdavids3

Board Regular
Joined
Feb 6, 2006
Messages
55
I have conditionally formatted several columns (8 total) in my data. I would like to conditionally format another column based on whether any of the other cells in that row were conditionally formatted.

I'm guessing this will have to be VB code but I don't even know where to begin on this one.

I also wouldn't mind doing all the conditional formatting in VB to make it a little more robust.

Thanks,

Brian
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.

Norie

Well-known Member
Joined
Apr 28, 2004
Messages
76,303
Office Version
  1. 365
Platform
  1. Windows
Brian

Can't you just use the condition(s) you used in the other columns?
 

bdavids3

Board Regular
Joined
Feb 6, 2006
Messages
55
Brian

Can't you just use the condition(s) you used in the other columns?

How would I do this? Each of the 8 conditionally formatted columns has 1 to 3 conditions.
 

Norie

Well-known Member
Joined
Apr 28, 2004
Messages
76,303
Office Version
  1. 365
Platform
  1. Windows
Brian

It's hard to tell without seeing the actual conditions.

You might just be able to use formulas with logical operators like OR/AND etc.

But you might be right about needing to use VBA.
 

Oaktree

MrExcel MVP
Joined
Jun 20, 2002
Messages
8,015
Office Version
  1. 365

ADVERTISEMENT

Well, you can use Chip Pearson's UDF here (http://www.cpearson.com/excel/CFColors.htm) to determine which (if any) of the conditional formatting conditions are applied.

But, I agree with Norie: it would probably be better to (if possible) just base the conditional formatting of the new ranges on a series of OR/AND functions.
 

bdavids3

Board Regular
Joined
Feb 6, 2006
Messages
55
Brian

It's hard to tell without seeing the actual conditions.

You might just be able to use formulas with logical operators like OR/AND etc.

But you might be right about needing to use VBA.

I think I didn't realize what you said originally, but I go it. Thanks.

Here's the final result:

Code:
=AND($F1="G",OR(AND($J1<>"Initiate",$H1=""),AND($H1<>"",$H1<NOW()),$I1<NOW(),AND($J1="Initiate",$K1=3,NOW()>($G1+14)),AND($J1="Initiate",$G1<(NOW()-30)),AND($J1<>"Initiate",$M1=""),AND($J1<>"Initiate",$N1=""),OR($O1>0.1,$O1<-0.1)))

I just combined all the individual conditions into a big AND/OR statement.
 

Norie

Well-known Member
Joined
Apr 28, 2004
Messages
76,303
Office Version
  1. 365
Platform
  1. Windows
Brian

No problem, glad to see you got it working.:)

Mind you I've a feeling that formula could probably be shortened a bit.

I'll take a look at it and see if I can see anything, but perhaps one of the formula wizards will pop by.
 

Forum statistics

Threads
1,141,018
Messages
5,703,754
Members
421,313
Latest member
Mooncake1

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top