Counting characters in multiple rows when rows meet specific criteria

  • Thread starter news.virginmedia.com
  • Start date
N

news.virginmedia.com

Hi can anyone help with what seems a simple task that I can't fathom. I want
to count characters in rows if the row starts with a certain inital in the
first columb:

a x x x
b x x x x
c x x x x x
a x x x
b x
c x x x x x


So what is the total number of "x" in rows begining with "b"

I thought it would be simple but I cant work out can someone help at all,

thanks
 
R

Rick Rothstein \(MVP - VB\)

Assuming the data starts in A1, that the last possible column that can
contain data is K (just to have an ending column to refer to in the formula;
change to suit your conditions) and the the maximum row where you could have
data is 100 (again, change to suit your conditions)...

=SUMPRODUCT((A1:A100="a")*(B1:K100="x"))

Rick
 
T

T. Valko

So what is the total number of "x" in rows begining with "b"

5

=SUMPRODUCT((A1:A6="B")*(B1:F6="X"))
 
M

Martin

Thanks Rick and Biff very much appreciated

=SUMPRODUCT((A1:A100="a")*(B1:K100="x"))

=SUMPRODUCT((A1:A6="B")*(B1:F6="X"))

I can get on again now :)

thanks
 

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