SUMPRODUCT to count BETWEEN numbers and only VISIBLE cells

Gilberto Fernandez

New Member
Joined
Jun 6, 2009
Messages
4
Hello,

Im currently using this formula to count cells that match the contents of another cell. It works perfectly only counting visible cells.

=SUMPRODUCT(--($A$12:$A$50000=A50003),(SUBTOTAL(103,OFFSET($A$12,ROW($A$12:$A$50000)-MIN(ROW($A$12:$A$50000)),,))))

I need another formula to count cells with the condition that its value lies between the values of two reference cells. I tried to modify the above formula but its not working.

=SUMPRODUCT(--($A$12:$A$50000>G50003),($A$12:$A$50000<=H50003),(SUBTOTAL(103,OFFSET($A$12,ROW($A$12:$A$50000)-MIN(ROW($A$12:$A$50000)),,))))

Any ideas?
Thanks,
Gilberto
 

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.
Try...

=SUMPRODUCT(--($A$12:$A$50000>G50003),--($A$12:$A$50000<=H50003),SUBTOTAL(103,OFFSET($A$12:$A$50000,ROW($A$12:$A$50000)-ROW($A$12),0,1)))
 
Upvote 0
That was a quick reply thank you very much.

The formula returns the TOTAL count of all the visible cells (its NOT counting ONLY the the cells which value is BETWEEN the two reference cells).
 
Upvote 0

Forum statistics

Threads
1,214,407
Messages
6,119,332
Members
448,888
Latest member
Arle8907

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