Why count ifs formula returns zero

flare9x

Board Regular
Joined
Jan 29, 2016
Messages
120
Hello all

I have this formula:

=COUNTIFS(B3:B23496,"Monday",M3:M23496,"True")

The logic looks correct - however the result is zero.... not sure why

B is text... Monday to Friday.... and then column M is and =if the number is higher than yesterday say true or false...

any ideas?
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
Check
1. if the values in B3:B23496 are texts or dates formatted as dddd
Try in an empty cell
=ISTEXT(B3)
copy down to, say, 10 rows

2. if the values in in M3:M23496 are texts or logical TRUE/FALSE
try
=ISTEXT(M3)
copy down

Tell us the results

M.
 
Upvote 0
I like to break a formula that isn't doing what I expect down into small steps so as well as your current formula =COUNTIFS(B3:B23496,"Monday",M3:M23496,"True")

try these =COUNTIFS(B3:B23496,"Monday") and =COUNTIFS(M3:M23496,"True") in new cells



<strike></strike>
 
Upvote 0
You could also try this:

=COUNTIFS(B3:B23496,"*Monday*",M3:M23496,"*True*")

If it works, then it's a case of leading or trailing spaces.
 
Upvote 0
Check
1. if the values in B3:B23496 are texts or dates formatted as dddd
Try in an empty cell
=ISTEXT(B3)
copy down to, say, 10 rows

2. if the values in in M3:M23496 are texts or logical TRUE/FALSE
try
=ISTEXT(M3)
copy down

Tell us the results

M.

M=True
B = False

Copied all the contents of B to a text file.. copied back... now - TRUE

Now formula says:

Monday#VALUE!

<tbody>
</tbody>
 
Upvote 0
If those TRUE's (and FALSE's) in M are not text, the following should work as intended:

=COUNTIFS(B3:B23496,"Monday",M3:M23496,TRUE)
 
Upvote 0
M=True
B = False

Copied all the contents of B to a text file.. copied back... now - TRUE

Now formula says:

Monday
#VALUE!

<tbody>
</tbody>

No need to change your original data.

It seems that column B contains dates formatted as dddd and column M contains text values.
So, keeping data as they are, try
=SUMPRODUCT(--(WEEKDAY(B3:B23496)=2),--(M3:M23496="TRUE"))

Hope this helps

M.
 
Upvote 0
No need to change your original data.

It seems that column B contains dates formatted as dddd and column M contains text values.
So, keeping data as they are, try
=SUMPRODUCT(--(WEEKDAY(B3:B23496)=2),--(M3:M23496="TRUE"))

Hope this helps

M.

Yes correct column B is dddd custom format. To create the data in column B this is the formula:


=IFERROR(DATE(LEFT(A2325,4),MID(A2325,5,2),RIGHT(A2325,2)),"")


That convers a number date in yyyymmdd to a day of the week.


So now looking for the countif formula to be able to read column B.


The result of the sum product formula:


Monday #VALUE!




Right now the IFError fields are FALSE when I run IStext()


So let me try and see if I can paste the values from a text file and store as text and see if the sum product formula will work
 
Upvote 0
Really not sure here...

istext() on both columns = True so i tried:

=COUNTIFS(B4:B23496,"Monday",M4:M23496,"TRUE")

I also tried to remove the " " quotations... with no luck either.

With both columns text = true the result is 0 and not #Value.
 
Upvote 0

Forum statistics

Threads
1,214,957
Messages
6,122,466
Members
449,086
Latest member
kwindels

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