Conditional Formatting from multiple columns

rasinc

Board Regular
Joined
Jun 28, 2011
Messages
134
I am trying to do some conditional formatting on data in a table. I would like the dates in columns I and J to be filled red when the date in both columns is less than Jan 1/20, green when the date in each column is greater or equal to Jan 1/23 and yellow if between those two dates but all scenarios only if column E is a quantity greater than zero.

I currently have the red setup for dates as

Excel Formula:
=AND(I2<DATE(2020,1,1),J2<DATE(2020,1,1))

I'd like to say it is working but it is colouring some cells with dates in 2023 and 2024 in each column and others that have both dates in 2016 are not coloured at all, and I haven't included the quantity yet.

I have a mental block on these conditional formulas for some reason. I tried setting up each column separately but had the same results.

Any help is greatly appreciated.
 
try a $
=AND($I2<DATE(2020,1,1),$J2<DATE(2020,1,1),$E2>0)

Green
=AND($I2>=DATE(2023,1,1),$J2>=DATE(2023,1,1),$E2>0)

Yellow - is that both are between the dates

less than 1/1/2020 and greater than 1/1/2023. so not possible

OR do you mean between

1/1/2020 and 1/1/2023

And E > 0


=AND($I2>=DATE(2020,1,1) , $I2<=DATE(2023,1,1) ,$J2>=DATE(2020,1,1), $J2<=DATE(2023,1,1) , $E2>0)
 
Last edited:
Upvote 0
Thank you for your reply. I was not able to get it to work with one formula so I set the data up in a table, filtered for Qty <>0 and set up three cells with the criteria dates. Then I set up the rules referencing the cells. This does work and gets me what I need. Thank you again.
 
Upvote 0
I was not able to get it to work with one formula
no, as i mentined you would need 3 - one for each colour
OR 2 if you setup one of the fill colours a a default
 
Upvote 0
try a $
=AND($I2<DATE(2020,1,1),$J2<DATE(2020,1,1),$E2>0)
This formula that checks dates in two columns and qty is what I was referring to. I had to filter the table to the quantity then use the conditional formula on the dates. It's working well now.
 
Upvote 0
I had to filter the table to the quantity then use the conditional formula on the dates

Are you sure that your numbers in column E are real numbers and not text? E5 in the XL2BB below is text.

Book2
EFGHIJ
22TRUE15/12/200917/12/2009
32TRUE15/12/200901/02/2020
40TRUE15/12/200917/12/2009
50FALSE15/12/200917/12/2009
Sheet1
Cell Formulas
RangeFormula
F2:F5F2=ISNUMBER(E2)
Cells with Conditional Formatting
CellConditionCell FormatStop If True
I2:J5Expression=AND($I2<DATE(2020,1,1),$J2<DATE(2020,1,1),$E2>0)textNO
 
Upvote 0

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
Back
Top