Excel formula to count number of rows with value greater than zero.

ssvv

New Member
Joined
May 12, 2011
Messages
22
Is there a way to count number of rows with values greater than zero?


For example:

Assuming I have selected A1: D10 (note that some rows may not have a value in them). Without creating a 'Total' column, is there a way to find out how many of these 10 rows have a value greater than zero?

Please help. Thanks.
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
Do you mean that the total of the row should be more than zero or that it contains any value > 0?

If it's the former then try this formula

=SUMPRODUCT((SUBTOTAL(9,OFFSET(A1:D10,ROW(A1:D10)-ROW(A1),0,1))>0)+0)
 
Last edited:
Upvote 0
Briliant!!! Thank you very much.

The formula works. Can you please explain the formula?

Thanks.
 
Upvote 0

Forum statistics

Threads
1,224,587
Messages
6,179,738
Members
452,940
Latest member
Lawrenceiow

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