adding IF statement to subtotal for autofiltered data

F

fbarbie

Hi,

I have a column that has the autofilter applied. Each cell in th
column will only consist of one letter. I can create the SUBTOTA
formula for it to count how many occupied cells there are. Now I wan
to count the number of times a particular letter occurs. So my origina
formula, which is in a cell F2 is this:

=SUBTOTAL(3,F7:F1000)

And I want to add an IF statement so it only counts the occurence o
the letter "D" in the filtered data. How do I incorporate IF into th
SUBTOTAL formula? Thanks in advance
 
B

Bob Phillips

=SUMPRODUCT((SUBTOTAL(3,OFFSET($F$6,ROW($F$7:$F$1000)-ROW($F$6),,1)))*(F7:F1
000="a"))

I assume that the data is being filtered, otherwise a simpler formula is
possible.

--

HTH

RP
(remove nothere from the email address if mailing direct)
 

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