Why is this not counting using the countifs?

BadFish523

Board Regular
Joined
Feb 15, 2018
Messages
56
I have a large amount of raw data and have a graph to help visualize the important info. I made a couple tables to fill the charts but one of my countifs isn't working. This is my formula =COUNTIFS(Data!B2:B,"=Doug Harrison",Data!A2:A,TODAY()) but it always returns 0. B2:B is where the names are and A2:A is where the dates are. I only want the chart to display how many of that name appear for today only. Can anybody help?
 
=COUNTIFS(Data!A2:A,">="&B28,Data!A2:A,"<="&B28,Data!B2:B,"Doug Harrison")

The formula is correct, but why do we have here >= B28 and <= B28 as this is equivalent to = B28?

Well this formula was originally used to get the name data from the beginning of the week to the end. I tried it is this but it still returns 0. Theres something not matching up as far as the data goes because I think these formulas should return some data.

=countIFS(Data!A2:A,B28,Data!B2:B,"Doug Harrison")
 
Upvote 0

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
Changing the formatting will not remove the time part. Try

=COUNTIFS(Data!A2:A,">="&B28,Data!A2:A,"<"&B28+1,Data!B2:B,"Doug Harrison")
 
Upvote 0
As another reference I also have a chart counting the name data for the month setup same as the week formula but using B31 and B32 as my start and end of the month. Both the weekly and monthly formulas work correctly which is why I tried using the <= and >= with B28 the same since it worked for the weekly and monthly.

Monthly formula =countIFS(Data!A2:A,">="&B31,Data!A2:A,"<="&B32,Data!B2:B,"Doug Harrison")
 
Upvote 0
Well this formula was originally used to get the name data from the beginning of the week to the end. I tried it is this but it still returns 0. Theres something not matching up as far as the data goes because I think these formulas should return some data.

=countIFS(Data!A2:A,B28,Data!B2:B,"Doug Harrison")

What does the following return?

=SUMPRODUCT(--(TRIM(Data!A2:A)=B28),--(TRIM(Data!B2:B)="Doug Harrison"))
 
Last edited:
Upvote 0
Changing the formatting will not remove the time part. Try

=COUNTIFS(Data!A2:A,">="&B28,Data!A2:A,"<"&B28+1,Data!B2:B,"Doug Harrison")
Boom, there it is!!!! thank you so much!!!! This formula has solved this problem. I'd give you a thanks and a like for this but they don't show up on your post for some reason?
 
Last edited:
Upvote 0
=COUNTIFS(Data!A2:A,">="&B28,Data!A2:A,"<="&B28,Data!B2:B,"Doug Harrison")

The formula is correct, but why do we have here >= B28 and <= B28 as this is equivalent to = B28?

Changing the formatting will not remove the time part. Try

=COUNTIFS(Data!A2:A,">="&B28,Data!A2:A,"<"&B28+1,Data!B2:B,"Doug Harrison")

Boom, there it is!!!! thank you so much!!!! This formula has solved this problem. I'd give you a thanks and a like for this but they don't show up on your post for some reason?

The solution (or the test Rory suggests) clearly agrees with the observation I made...
 
Upvote 0

Forum statistics

Threads
1,214,973
Messages
6,122,534
Members
449,088
Latest member
RandomExceller01

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