Sum question

thescream80

Board Regular
Joined
Mar 28, 2014
Messages
119
Office Version
  1. 2019
  2. 2016
Platform
  1. MacOS
Hello,

i have a easy question. Atleast I hope it is easy. I am trying to count every cell in column b that has text in it or is not blank. Either one will work I think.

Thank you so much for any help!!
 

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.
Normally I'd use either

Code:
=COUNTA(B:B)
or if B contains formulas
Code:
=SUMPRODUCT(--(LEN(B:B)>0))
 
Upvote 0
=SUMPRODUCT(--(LEN(B:B)>0))

Never ever use B:B with SUMPRODUCT or any array parameter. It creates arrays of 1M+ elements in Excel 2007 and late.

COUNTA(B:B) is questionable. It depends on how clever the COUNTA function is. Hopefully, it determines the last row used and only counts that subrange (less than 1M+ rows).
 
Upvote 0

Forum statistics

Threads
1,224,820
Messages
6,181,160
Members
453,021
Latest member
Justyna P

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