Find any names that match within a 1 month period

TAPS_MikeDion

Well-known Member
Joined
Aug 14, 2009
Messages
622
Office Version
  1. 2011
Platform
  1. MacOS
Hi all,

I was hoping someone might have a conditional format formula that would work for this. It's pretty basic, I'm sure, for those of you with extensive Excel knowledge. Anyway, what I'm trying to accomplish is to have Excel search through the LAST NAME, FIRST NAME and DATE columns to find any names that match within a 1 month period. If the dates are more than a month apart, they can be ignored. I would like to have the background change to red and the text to yellow (as seen in the sample) for any match found within the same month.

Thank you very much!

-Mike

Rubber Gloves Dispersement 2021.xlsx
ABCDEF
1LAST NAMEFIRST NAMEDATESIZE# OF BOXESNOTES
2DoeJane1/15/21X1
3DoeJohn1/15/21L1
4SmithBob2/4/21L1
5WilliamsLisa2/4/21L1
6WilliamsLisa3/1/21S1
7StoneSamantha3/3/21M1
8RhoadsSchuyler3/15/21L1
9StoneSamantha3/25/21M1
10
WIP
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
How about
+Fluff 1.xlsm
ABCDEF
1LAST NAMEFIRST NAMEDATESIZE# OF BOXESNOTES
2DoeJane15/01/2021X1
3DoeJohn15/01/2021L1
4SmithBob04/02/2021L1
5WilliamsLisa04/02/2021L1
6WilliamsLisa01/03/2021S1
7StoneSamantha03/03/2021M1
8RhoadsSchuyler15/03/2021L1
9StoneSamantha25/03/2021M1
Main
Cells with Conditional Formatting
CellConditionCell FormatStop If True
A2:F9Expression=COUNTIFS($A$2:$A2,$A2,$B$2:$B2,$B2,$C$2:$C2,">"&EOMONTH($C2,-1),$C$2:$C2,"<="&EOMONTH($C2,0))>1textNO
 
Upvote 0
Fluff to the rescue. LOL

Hi Fluff,
Thanks for your response. I tried with my actual data (I didn't want to put the real info on here) and your formula works, but only within the same month. It was my fault for not making it absolutely 100% clear. What I'm trying to do is have it check (I guess) within a 30 day span. I stated 1 month, but I don't know if that would involve too much coding.

For example:
6/29/21 - 7/4/21 is only 5 days, which obviously falls within the 30 day period.

Thank you again.
 
Upvote 0
Ok, how about
Excel Formula:
=COUNTIFS($A$2:$A2,$A2,$B$2:$B2,$B2,$C$2:$C2,">="&$C2-15,$C$2:$C2,"<="&$C2+15)>1
 
Upvote 0
Solution
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,908
Messages
6,122,187
Members
449,072
Latest member
DW Draft

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