Formula Help

Irwell

Board Regular
Joined
May 24, 2012
Messages
54
Office Version
  1. 365
Platform
  1. Windows
Hi,

I've done this formula but it's returning an incorrect answer, any ideas what's wrong with it.

Column E in contacts is the contact date and time in this format 13/11/2017 12:10

Column F is the contact type and is text

Cell A9 is contact type and is text.

=COUNTIFS(Contacts!$E:$E,">="&DATE(2018,10,1),Contacts!$E:$E,"<="&EOMONTH(DATE(2018,10,1),0),Contacts!$F:$F,$A$9)

Is it something to do with the fact that my dates have the times in?
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
Right, I've just established that it's not recording any on the 31st October so it must be something to do with my formula? Any help greatly appreciated, thank you.
 
Upvote 0
The time parts are the issue, since your end criterion basically 31st October at 12am. Change it to:

"<"&EOMONTH(DATE(2018,10,1),0)+1

so it will return anything before 1st November.
 
Upvote 0
The time parts are the issue, since your end criterion basically 31st October at 12am. Change it to:

"<"&EOMONTH(DATE(2018,10,1),0)+1

so it will return anything before 1st November.

Worked a treat thank you.
 
Upvote 0
Found a problem with the formula - Our contacts are being put in at midnight so 1st November 00:00 and it's bringing those through, going forward I could ask that correct times are used but it doesn't help historically.
 
Upvote 0
It won't bring those through as it's looking for <1st Nov, not <=1st Nov.
 
Upvote 0
It won't bring those through as it's looking for <1st Nov, not <=1st Nov.

It's just one column when I've re-ran it today, it returns 73 but when I run the pivot to have a look at it I can only see 72 which is really odd.
 
Upvote 0
Without your data I couldn't really say why that might be.
 
Upvote 0

Forum statistics

Threads
1,224,824
Messages
6,181,187
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

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