Count blank cells in a range and contiguous blank cells also as single cells! Tricky One!

SebastianColombia

New Member
Joined
Oct 21, 2013
Messages
12
I have a tricky need in Excel, which I haven't been able to solve. I think it's quite complicated and I don't have enough knowledge about VBA codes.
frown.gif
. I would really appreciate if you could help me with this.!!!!!!

Basically what I'd like to do is to create a function. The input would be a RANGE with blank cells, and non blank cells. I would expect the function to COUNT 'SINGLE BLANK CELLS' as single "ranges" and CONTIGUOUS BLANK CELLS as single ranges too. I know it's kind of tricky, but I made a video.

https://www.youtube.com/watch?v=QGS8DBcA5HA&feature=youtu.be

Thanks a lot.
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.

Aladin Akyurek

MrExcel MVP
Joined
Feb 14, 2002
Messages
85,210
Row\Col
A​
B​
C​
D​
2​
2​
4​
3​
4​
jad
5​
6​
7​
8​
nad
9​
8​
10​
11​
5​
12​
3​
13​
14​
15​
6​

D1, control+shift+enter, not just enter:

=SUM(IF(FREQUENCY(IF(A2:A15="",ROW(A2:A15)),IF(1-(A2:A15=""),ROW(A2:A15))),1))
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,163,955
Messages
5,834,573
Members
430,297
Latest member
xa_gta

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
Top