Count the Number of Blank Cells, then Stop

Guzzlr

Well-known Member
Joined
Apr 20, 2009
Messages
946
Office Version
  1. 2016
Platform
  1. Windows
Hello All...
I have this:
Code:
=COUNTBLANK(Q4:AS4)

This will work, from the range of Q4:AS4, which is 29 blank cells. However, the numbers stop at BA4 so the COUNTBLANK function begins counting these blank cells.
What I need, is if the cells is blank (no number) in a row, it will count the number of blank cells, then stop at the first cell that has a number.
In the above example, the number would stop at 29 blank cells, because cell 30 in row 4 has a number >=0

Thanks for the help
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
1601058543793.png


So in this image, we see "0" in Range (V5:X5), so I would want a macro or formula to count the number of BlankCells from P5:U5, and then stop. Of course, each row to Last Row.
The problem with the formula COUNTBLANK, is it continues to count after X5

Thanks for the help
 
Upvote 0

Forum statistics

Threads
1,215,052
Messages
6,122,878
Members
449,097
Latest member
dbomb1414

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