=sum(countif... array formula but only for non empty cells

joshman108

Active Member
Joined
Jul 6, 2016
Messages
310
Functionally, this is working and doing what I need:
={SUM(COUNTIF(B:AO,B1:AO1))}

It's just really slow because I have 9000 rows and this is being dragged down. It would probably take hours to calculate. I'm assuming it's slow because it's taking empty cells into account as in general, only about 1/3 of all cells b1:ao1 (and on all other rows) actually have values. The rest are blank. What's the fastest way of accomplishing my formula without the major calculation time - which I'm assuming is because it's searching blank cells which I don't actually need to be searching, since they're blank?

I tried something like this:

=SUM(COUNTIF(B:AO,IF(B1:AO1="","",B1:AO1)))

but that doesn't work :p
 
Last edited:

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
You could try:

=SUM(IF(B1:AO1="",0,COUNTIF(B:AO,B1:AO1)))
with Control+Shift+Enter,

but I don't know how much that will help.
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,287
Members
452,631
Latest member
a_potato

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