Conditional Formatting: Identifying duplicates and considering dates

DanelleS

New Member
Joined
Sep 23, 2020
Messages
2
Office Version
  1. 2019
  2. 2016
Platform
  1. MacOS
Hello all,

I am trying to do conditional formatting to identify some emails based on how frequently they are on the sheet and when. I have the emails all listed in column H and dates listed in column B, data starts in row 2 for both. Basically I am trying to identify if an email pops up more than once on my list BUT ONLY within the last 30 days. If it pops up on the list beyond 30 days, it does not need to be highlighted or accounted for.

I currently have the following formulas, but they arent doing exactly what I need:
=AND(COUNTIF(H:H, H1)>=2, B1>=TODAY()-30)
=(COUNTIF(H:H, H1)>=2)*(B1>=TODAY()-30)

The problem is that if there are two emails on my list, one within 30 days of today and one beyond 30 days, the one within the last 30 days gets highlighted, however, I only want it to highlight if both appear within 30 days. I don't need it to consider emails beyond 30 days from today.

Does anyone have any ideas for a solution formula? Any help is greatly appreciated!
 

Some videos you may like

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
55,570
Office Version
  1. 365
Platform
  1. Windows
Hi & welcome to MrExcel.
How about
Excel Formula:
=AND(B1>=TODAY()-30,COUNTIFS(H:H,H1,B:B,">="&TODAY()-30)>1)
 

DanelleS

New Member
Joined
Sep 23, 2020
Messages
2
Office Version
  1. 2019
  2. 2016
Platform
  1. MacOS
Thank you SO much! You cracked the code!
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
55,570
Office Version
  1. 365
Platform
  1. Windows
You're welcome & thanks for the feedback.
 

Watch MrExcel Video

Forum statistics

Threads
1,127,613
Messages
5,625,848
Members
416,139
Latest member
MattBoard

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