Conditional formatting column with multiple conditions

Metaphysix

New Member
Joined
Feb 19, 2015
Messages
13
Trying to develop a single formula for conditional formatting that doesn't include a cell reference so I can apply to an entire column. My data is a column of dates, but runs across multiple blanks and column headers that I don't want formatted.

Conditions:

1. not(isblank)
2. is(date)
3. <today() +7

I was able to sort of get these conditions checked when using cell references, but having a hard time translating this into a format that could be applied as a true / false test for each cell in a column:

=AND(A1<>"",IF(LEFT(CELL("format",A1),1)="D","TRUE","FALSE"),A1<TODAY()+7)

Probably a simpler way to get the date format checked, but this works. Also need to double check that the AND statement evaluates the result from the 2nd logic test as TRUE / FALSE rather than text, but it seems to work so far.

Any help would be appreciated!
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
Try:

Dante Amor
A
1Date
210-nov
311-nov
412-nov
513-nov
614-nov
715-nov
816-nov
917-nov
1018-nov
1119-nov
1220-nov
1321-nov
Sheet1
Cells with Conditional Formatting
CellConditionCell FormatStop If True
A2:A13Expression=Y(A2<>"",CELDA("format",A2)="D2",A2<HOY()+7)textNO
 
Upvote 0
Thanks, I'm not familiar with the CELDA or HOY functions and they don't seem to be recognized when I try to build a formula outside of conditional formatting, but it is accepting that as a valid formula. Wish there was a way to view syntax and evaluate the formula when working in conditional formatting.

Unfortunately, I'm not getting any indication that the formula is working. I changed all the "A1" references to "G1" where my source data lives, and have run through D1 / D2 / D3 / D4 as possible outputs for date formatting, but none seem to be triggering the condition. Next steps?
 

Attachments

  • Capture.PNG
    Capture.PNG
    20.3 KB · Views: 13
Upvote 0
Sorry. It's my fault. My excel is in Spanish.

According to your image your dates start in cell G6. So the conditional formatting must start in cell G6

The corrected formula:

Dante Amor
G
5FECHA
610-nov
711-nov
812-nov
913-nov
1014-nov
1115-nov
1216-nov
1317-nov
1418-nov
1519-nov
1620-nov
1721-nov
Sheet1
Cells with Conditional Formatting
CellConditionCell FormatStop If True
G6:G17Expression=AND(G6<>"",CELL("format",G6)="D2",G6<TODAY()+7)textNO
 
Upvote 0

Forum statistics

Threads
1,223,910
Messages
6,175,316
Members
452,634
Latest member
cpostell

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