How do I make it add a column based on 2 different criteria?

L

Leslie M

I am trying to add sales gross for individual salespeople, and break it down
by new vehicles vs. used vehicles. I have a column set up for the sales
people, a column set up for the type (N or U), and a column set up for the
gross that I want to add. I can make it add up the gross of new vs. used
using the sumif function, but I don't know how to make it do "if this = this,
and this = this, then add this through this". Does that make sense? I'm sure
it's not as hard as I'm making it out to be. Can anyone help?

Thanks!
 
B

Bob Phillips

=SUMPRODUCT(--(A1:A100="Bob"),--(B1:B100="N"),C1:C100)

Note that SUMPRODUCT doesn't work with complete columns, you have to specify
a range.

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)
 
L

Leslie M

When I type that formula in, it's coming up as $0.00 which isn't right. I'm
probably missing something- any ideas?
 
L

Leslie M

I got it to work... thanks for your help!! :eek:)

Bob Phillips said:
=SUMPRODUCT(--(A1:A100="Bob"),--(B1:B100="N"),C1:C100)

Note that SUMPRODUCT doesn't work with complete columns, you have to specify
a range.

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)
 
B

Bob Phillips

Can you tell us what the problem was just in case someone else gets it?

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)
 
L

Leslie M

I had the salespeople identified by their sales numbers, not their names, and
therefore the quotes had to be removed around the number
 
Top