MULTIPLE IF STATEMENTS PULLING DATA FROM MORE THAN ONE COLUMN

J

Jeremy A.

For the spreadsheet below, column A is the initials of a salesperson and
column B is the type of deal (f is a finance, c is a cash and L is a lease
deal. I want to count the number of L's there are for GR and CC.

I have tried many combinations of IF statements and cant figure out how to
combine the two. How many times does L appear in column B when CC is in
column A? Once I get it for one, I can make the necessary changes to count
the rest.

My spreadsheet looks like this
column
A B
GR L
GR L
CC C
CC L
CC L
CC L
GR F
GR C
CC C
GR L
CC L
CC C
CC L
GR F
CC L
 
T

T. Valko

How many times does L appear in column B
when CC is in column A?

Try this:

=SUMPRODUCT(--(A1:A10="CC"),--(B1:B10="L"))

Better to use cells to hold the criteria:

D1 = CC
E1 = L

=SUMPRODUCT(--(A1:A10=D1),--(B1:B10=E1))
 
J

Jeremy A.

Thank you so much! It worked great!!

T. Valko said:
Try this:

=SUMPRODUCT(--(A1:A10="CC"),--(B1:B10="L"))

Better to use cells to hold the criteria:

D1 = CC
E1 = L

=SUMPRODUCT(--(A1:A10=D1),--(B1:B10=E1))
 

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