Count dates in range in last X Days

Drexl88

Board Regular
Joined
Jan 20, 2020
Messages
75
Office Version
  1. 365
Platform
  1. Windows
Hi,

I have used a Max formula to return the most recent date in the rows in ranges G4:G7, G19:G17, G19:G55, G57:G58, G60:G66 and require a formula to now count how many of the dates in the column G ranges are within the last 60days.

Thanks
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
Hi Dear,

Please try the following:
=COUNTIF(G:G,">"&TODAY()-60)

Adjust range if required

Best Regards
 
Upvote 0
Consider:

Book1
DEFG
1
224
3
41/1/2020
58/1/2020
62/2/2020
78/10/2020
8
9
10
11
12
13
14
15
16
178/11/2020
188/25/2020
196/9/2020
20
Sheet4
Cell Formulas
RangeFormula
D2D2=COUNTIF(G4:G7,">="&TODAY()-60)
E2E2=SUM(COUNTIF(OFFSET(G1,{4,17,19,57,60}-1,0,{4,3,37,2,7}),">="&TODAY()-60))


If you want a formula that counts dates in your range for each of your ranges, use the D2 formula. You can 5 similar formulas and add them up to get the grand total, or you can use the E2 formula. The first array constant is the top row of the range, the second array constant is the number of cells in the range.

If there are no other dates in the G column that might affect the results of your formula, then mamady's formula would work.
 
Upvote 0

Forum statistics

Threads
1,214,983
Messages
6,122,592
Members
449,089
Latest member
Motoracer88

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