Counting duplicate within 90 days

Jzaid

New Member
Joined
Feb 4, 2021
Messages
5
Office Version
  1. 2016
Platform
  1. Windows
I need to count if a unique id has been used within the previous 90 days of the most recent used date. It is considered a duplicate
217CB0AB-95E3-48B5-B9F0-CCDE1F638BCC.jpeg
if it has been used within the previous 90 days, however it if was used greater than 90 days it is not a duplicate. I need this to run off the date the unique Id was used, and not off of today’s date.

Column A is date
Column B is unique id
Column C would then be the formula.
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).

maabadi

Well-known Member
Joined
Oct 22, 2012
Messages
2,612
Office Version
  1. 2019
  2. 2016
Platform
  1. Windows
Welcome to MrExcel Message Board.
Try this At C2 & Drag it Down
Excel Formula:
=SUMPRODUCT(($B$2:$B$13=B2)*((TODAY()-$A$2:$A$13)<=90))
 

Jzaid

New Member
Joined
Feb 4, 2021
Messages
5
Office Version
  1. 2016
Platform
  1. Windows
My initial trial with this didn’t work, I tried changing the absolutely reference $b$13/$a$13, which did ensure the forumla was only referencing in the past. One complication I should have explained, there may be hundreds of entries per date of different unique ids, not a single entry per date.
 

maabadi

Well-known Member
Joined
Oct 22, 2012
Messages
2,612
Office Version
  1. 2019
  2. 2016
Platform
  1. Windows
Please upload your example file & Desired Results with XL2BB ADDIN (Preferable) OR upload it at free uploading site e.g. www.dropbox.com or googledrive or onedrive and insert link here.
 

Jzaid

New Member
Joined
Feb 4, 2021
Messages
5
Office Version
  1. 2016
Platform
  1. Windows

ADVERTISEMENT


here is a link for an example.
 

Peter_SSs

MrExcel MVP, Moderator
Joined
May 28, 2005
Messages
51,220
Office Version
  1. 365
Platform
  1. Windows
here is a link for an example.
The link comes up with an "Access Denied" tab stating "You need access". XL2BB as suggested by maabadi will allow you to post a small sample directly into a post here.

Also, is this a Google Sheets question or an Excel question?
 

Jzaid

New Member
Joined
Feb 4, 2021
Messages
5
Office Version
  1. 2016
Platform
  1. Windows

ADVERTISEMENT

Apologies I’ve turned on link sharing. This is an excel question, I cannot download xl2bb add on to my work computer.
 

maabadi

Well-known Member
Joined
Oct 22, 2012
Messages
2,612
Office Version
  1. 2019
  2. 2016
Platform
  1. Windows
Your date inputed as Text then Countif doesn't work. you have two ways:
1. At column E write =B2*1 & drag it down then replaced Column A date with column E with Paste as Values.Now use this Formula:
Excel Formula:
=COUNTIFS(C:C,C2,B:B, B2,A:A, ">=" & TODAY()-90)

OR
2. SUMPRODUCT
Excel Formula:
=SUMPRODUCT(($B:$B=B2)*($C:$C=C2)*($A:$A<=(TODAY()-90)))
 
Solution

Jzaid

New Member
Joined
Feb 4, 2021
Messages
5
Office Version
  1. 2016
Platform
  1. Windows
Your date inputed as Text then Countif doesn't work. you have two ways:
1. At column E write =B2*1 & drag it down then replaced Column A date with column E with Paste as Values.Now use this Formula:
Excel Formula:
=COUNTIFS(C:C,C2,B:B, B2,A:A, ">=" & TODAY()-90)

OR
2. SUMPRODUCT
Excel Formula:
=SUMPRODUCT(($B:$B=B2)*($C:$C=C2)*($A:$A<=(TODAY()-90)))
Thanks for the help!
 

maabadi

Well-known Member
Joined
Oct 22, 2012
Messages
2,612
Office Version
  1. 2019
  2. 2016
Platform
  1. Windows
You're Welcome & Thanks for Feedback.
 

Forum statistics

Threads
1,144,612
Messages
5,725,315
Members
422,612
Latest member
Sanussha

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