How to add number of non-blank cells in a range and leave blank if 0

OccamsShaver

New Member
Joined
Jul 14, 2017
Messages
9
Hi-
This is probably easy for the experienced folks here.
I am simply wanting to calculate the number of nonblank cells (numerical) between columns F2:BF2 and want to leave the new cell blank if all of the cells in that range are blank.

Any suggestions?

Thank you!

OS
 
The reason why I included the COUNTBLANK is to account for the possibility of text or negative numbers.
If there was just blanks and those values, it would differentiate from all blanks, and return a value of 0 instead of a blank.

Which one makes more sense depends on whether this possibility exists, and how they want to handle that possibility.
 
Upvote 0

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
Can you please explain this? Thanks
It is just a Custom Number Format that hides any value less than or equal to zero.
You could format your cells that way to hide those values.
 
Upvote 0
for example, formula in A1 is =countif(B:B,">0")

Select A1, right click-[format cells]-[custom], in the textbox on the right side, enter 0;;

if =countif(B:B,">0") returns a value >0, A1 will show the number; if =countif(B:B,">0") returns 0, A1 just seems like a blank cell while stored the number 0.
 
Upvote 0

Forum statistics

Threads
1,224,943
Messages
6,181,913
Members
453,071
Latest member
Gizmo2024

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