COUNTA, remove null or blanks from count

JR2

New Member
Joined
Feb 22, 2024
Messages
2
Office Version
  1. 365
Platform
  1. Windows
I'm using the following formula, but I do not want it to take into account blank cells or null cells.
=COUNTA(Monday!L5:L11,Tuesday!L5:L11,Wednesday!L5:L11,Thursday!L5:L11,Friday!L5:L11,Saturday!L5:L11,Sunday!L5:L11)


The above cells also have the following formula
=IF(COUNTIF(B6:K6,"X")=0,"",COUNTIF(B6:K6,"X"))
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
COUNTA counts non empty cells, and formulas in a cell count as "non empty", even if they are returning a "". You may likely need to use another COUNTIF/COUNTIFS for cells that are not blank. What values are in those cells anyway?
 
Upvote 1
Hi & welcome to MrExcel.
Change the COUNTA to COUNT
 
Upvote 1
Solution
Welcome to the Board!

If you use COUNT instead of COUNTA, it will only count the cells containing numbers!
 
Upvote 1
From the original post:

So, the only possible values that formula can return is "" or numbers greater than 0.
It would seem the most sense is made when I read all of the post. Rather, I read it, but didn't stop to consider what the formula was returning. Oops.
 
Upvote 1
It would seem the most sense is made when I read all of the post. Rather, I read it, but didn't stop to consider what the formula was returning. Oops.
No worries!
I was just about to ask the same question myself, but then I went back and read the original post a little closer and figured out what it was returning.
 
Upvote 1
Thanks everyone, changing it to COUNT solved it. I also appreciate the "TIPS FOR FINDING EXCEL SOLUTIONS". I need to get better on how to write my question, to search for a solution before posting.
 
Upvote 0
Glad we could help & thanks for the feedback.
 
Upvote 0

Forum statistics

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