Highlight row if column "D" contains year < 1/1/2023, organized subtotals...

cweaver

New Member
Joined
Jan 20, 2006
Messages
21
Office Version
  1. 365
Platform
  1. MacOS
Hi all,

I'm working with an Excel that I've organized into subtotals (thank you to Mr Excel for that!). I need a formula for doing the following:

1. I'd like to highlight the row (customer name) if:

- Column "D" (invoice date) for that customer contains a year less than 1/1/2023,
- and the customer should not contain any dates in 2023.

Here's some sample data:
1694796482113.png

1694796501706.png
 
OK, do the following:

1. Remove all the Conditional Formatting Rules you currently have in there.
2. Select the range A2:D9002
3. Go to Conditional Formatting and enter the following formula, exactly as-is:
Excel Formula:
=AND($D1<>"",YEAR($D2)<2023,COUNTIFS($A$2:$A$9002,$A2,$D$2:$D$9002,">="&DATEVALUE("1/1/2023"))=0)
4. Choose your desired CF format/color.
 
Upvote 1
Solution

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
I got it to work!...Thank you! Is there some way to also have highlighted the subtotal roll-up Total, so that I don't have to expand the selections to see the color?

Screenshot 2023-09-15 at 2.27.43 PM.png
 
Upvote 0
I got it to work!...Thank you! Is there some way to also have highlighted the subtotal roll-up so that I don't have to expand the selections to see the color?
You are welcome.
That is a slightly different question than the original one asked, and may warrant a new thread.
The answer will probably be quite a bit different.
 
Upvote 0

Forum statistics

Threads
1,215,387
Messages
6,124,633
Members
449,177
Latest member
Sousanna Aristiadou

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