CountIfs w/ Dates

Robby19

Board Regular
Joined
Mar 19, 2018
Messages
227
Good day experts!

I am trying to get a count of data that meets multiple conditions. I have gotten then formula down, but it doesn't really seem to work. Case in point, with the below formula my total count is 98, when there are only 58 records that meet all of the conditions.

Could you please review and see if I am doing something wrong.
Code:
=COUNTIFS(AviKick[PMOS],[@MOS],AviKick[Date Enlistment or Acceptance],">=10/1/2018",AviKick[Date Enlistment or Acceptance],"<=12/31/2018",AviKick[DCC],"KC")+COUNTIFS(AviKick[PMOS],[@MOS],AviKick[Date Enlistment or Acceptance],">=1/1/2019",AviKick[Date Enlistment or Acceptance],"<=9/30/2019",AviKick[DCC],"KC")
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
I also tried this, which reports the exact same numbers.

PrevStart = 1 Oct 2018
PrevEnd = 30 Sep 2019

Code:
=COUNTIFS(AviKick[PMOS],[@MOS],AviKick[DCC],"KC",AviKick[Date Enlistment or Acceptance],">="&PrevStart,AviKick[Date Enlistment or Acceptance],"<="&PrevEnd)
 
Upvote 0
I found the issue. The formulas, both of them, are working perfectly fine. It was human error in the fact that I have duplicated data on the report.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,170
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