Dear Excel Wizards

HelpNeeded47

New Member
Joined
Aug 9, 2022
Messages
7
Office Version
  1. 365
I'm looking for a solution to a troubling formula. I'm trying to count entries from the past month, past 3 months and the past year. I know I'm going wrong somewhere as the latter two categories are coming back as 0s, when they should at least be returning the same total as the first.

Excel Formula:
="Closed this month:" &COUNTIFS(L5:L10020,"*Closed*",M5:M10020,"<="&EOMONTH(TODAY()-1,1)) &CHAR(10)&"Closed in past 3 months:" &COUNTIFS(L5:L10020,"*Closed*",M5:M10020,"<="&EOMONTH(TODAY(),-90)+1) &CHAR(10)&"Closed in past year:" &COUNTIFS(L5:L10020,"*Closed*",M5:M10020,"<=" & EOMONTH(TODAY(),-365)+2)

Is there anything glaringly obvious that needs to be changed? I'd also be very grateful if someone could explain to me what the number functions here actually do...

,"<="&EOMONTH(TODAY(),-90)+1)
 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
The second argument in the EOMONTH function is months, not days.
So you are telling it to go back 90 months!

See: EOMONTH function
 
Upvote 0
Solution
The 2nd argument in EOMONTH, is the number of months, so you are saying 90 months before today.
 
Upvote 0
You are welcome.
Glad we could help!
 
Upvote 0

Forum statistics

Threads
1,224,817
Messages
6,181,149
Members
453,021
Latest member
Justyna P

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