Count Text Values in a filterd column

G

Guest

I need a running count at the top of a column of single text vaules in a
column once sheet has ben filtered.

eg: need running count of number of W's if I filter by pairs 1 to 5 only.

Cable Pair # Type Status
NHI 1 1 ** W
NHI 1 2 ** W
NHI 1 3 ** W
NHI 1 4 ** S
NHI 1 5 ** W
NHI 1 6 ** W
NHI 1 7 ** F
NHI 1 8 ** S
NHI 1 9 ** W
NHI 1 10 ** S
NHI 1 11 ** F
NHI 1 12 ** W
NHI 1 13 ** S
NHI 1 14 ** S
NHI 1 15 ** S
NHI 1 16 ** S
NHI 1 17 ** W
NHI 1 18 ** S
NHI 1 19 ** S
NHI 1 20 ** W
NHI 1 21 ** S
NHI 1 22 ** S
NHI 1 23 ** S
NHI 1 24 ** S
NHI 1 25 ** S
NHI 1 26 ** S
NHI 1 27 ** S
NHI 1 28 ** S
NHI 1 29 ** S
NHI 1 30 ** W
NHI 1 31 ** W
NHI 1 32 ** W
NHI 1 33 ** S
NHI 1 34 ** S
 
B

Bob Phillips

=SUMPRODUCT(SUBTOTAL(3,OFFSET(E1,ROW($E$2:$E$35)-ROW($E$1),,1)),--($E$2:$E$35="W"))

--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
G

Guest

Assuming data is in columns A to D:

=SUMPRODUCT(--(B2:B100)<=5),--(D2:D100="W"))

will give the required result (and no need to filter)

You could change the 5 to a cell reference containing your max pair value

HTH
 
G

Guest

Thanks Toppers

But when I write
=SUMPRODUCT(--(B6:B3000)<=H3)--(D6:D3000="w")

It won't except the last bracket and returns an error.

Is there also a way of setting a max and min pair range?

Cheers
 
G

Guest

my error ....bracket in wrong place ....

=SUMPRODUCT(--(B6:B3000<=H3)--(D6:D3000="w"))

HTH
 
G

Guest

...oh dear ....bad day at the office ....

=SUMPRODUCT(--(B6:B3000<=H3),--(D6:D3000="w"))
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top