COUNT Non-Blank Cells if Value in column Header

surkdidat

Well-known Member
Joined
Oct 1, 2011
Messages
582
Office Version
  1. 365
Apologies for the multiple questions today.. My brain is just not functioning!

In Row 1 (From B:G I have a cell which is either blank or non-blank)

In Cells B2:G100, these may contain a value or not.

What I need is a COUNTIF the column has a header value to count. If the column header is blank, then whatever cells are filed in or not, it ignores in the count

COLUMN BCOLUMN CCOLUMN D
Header_1Header_2<blank>
hhuuiwdfdsdffs
dsafdfssdfdfsdfsdf
dfsfsdsdfdf
dsfdffsfsdfds
dfasddfdfsah
dfsdsfdfsdfdf
dfsdfdfgfg
(COUNT 7)(COUNT 4)(COUNT 0)

So the answer i need is 11

I need a formula that will dun the length of the specified columns and just return a count of one figure please.. The number of columns will increase over time, so preferably a formula that I an just change the columns i want captured, rather than one that is column B+Column C+Column D all in one formaula (if that makes sense!)
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
How about
Excel Formula:
=SUMPRODUCT((B1:F1<>"")*(B2:F20<>""))
 
Upvote 0
Solution
Apologies for the multiple questions today.. My brain is just not functioning!

In Row 1 (From B:G I have a cell which is either blank or non-blank)

In Cells B2:G100, these may contain a value or not.

What I need is a COUNTIF the column has a header value to count. If the column header is blank, then whatever cells are filed in or not, it ignores in the count

COLUMN BCOLUMN CCOLUMN D
Header_1Header_2<blank>
hhuuiwdfdsdffs
dsafdfssdfdfsdfsdf
dfsfsdsdfdf
dsfdffsfsdfds
dfasddfdfsah
dfsdsfdfsdfdf
dfsdfdfgfg
(COUNT 7)(COUNT 4)(COUNT 0)

So the answer i need is 11

I need a formula that will dun the length of the specified columns and just return a count of one figure please.. The number of columns will increase over time, so preferably a formula that I an just change the columns i want captured, rather than one that is column B+Column C+Column D all in one formaula (if that makes sense!)
Have you found the answer to your question, I have a similar issue.
 
Upvote 0
As surkdidat marked post post# as the solution, I'm guessing the answer is yes.
 
Upvote 0

Forum statistics

Threads
1,214,798
Messages
6,121,630
Members
449,041
Latest member
Postman24

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