counting blank cells in every growing table

Afro_Cookie

Board Regular
Joined
Mar 17, 2020
Messages
103
Office Version
  1. 365
Platform
  1. Windows
I want to count the number of blank cells in A:A but only relating to my table size. Is there a way to only have the cells in my current table be counted?
Formula's I've tried so far with no luck:
VBA Code:
=countblank(A:A)
=countif(A:A,"")

Also, I know it's not VBA code, but wanted to show it nicely. VBA is an option if that is the best method.
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
Why not just limit the formula to the size of the table?
 
Upvote 0
Why not just limit the formula to the size of the table?
The table is currently from A9:A250 but not all the values in A are filled in. We add to this table daily and I don't want to have to change the references each day.
 
Upvote 0
Is your "table" a proper table, or just a range of cells?
If it's just a range, then convert it to a proper table and you can use something like
=COUNTBLANK(Table1[Name])
 
Upvote 0
It was a table already but I did not think of calling the table as a whole, thanks Fluff.

Once again, you've made my bacon.
 
Upvote 0
You're welcome & thanks for the feedback
 
Upvote 0
just for fun with Power Query...
another approach
Rich (BB code):
let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    Result = Table.SelectColumns(Table.AddColumn(Table.Transpose(Source), "CountBlank", each List.Count(List.Select(Record.FieldValues(_), each _ = null))),{"CountBlank"})
in
    Result
eg.
CountCountBlank
a4
x
d
z
dr

blue table contain blanks and empty strings but only real blanks will be counted
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,403
Messages
6,119,309
Members
448,886
Latest member
GBCTeacher

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