IF and VLookup

A

Ashley

Any help is greatly appreciated.

In column S, I have either a D, a C, or a blank. Below my data I am trying
to perform the sum function for all the amounts in column R that have a D in
column S and a sum for all the amounts in column R that have a C in column S.
Is it possible to combine the SUM and IF/VLookup functions?
 
P

PCLIVE

You don't need lookup. Try this:

=SUMIF(S:S,"D",R:R)

=SUMIF(S:S,"C",R:R)

HTH,
Paul
 
B

Bob Phillips

=SUMPRODUCT((D1:D10={"D","C",""})*(R1:R10))

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)
 
B

Bob Phillips

or even

=SUMPRODUCT(SUMIF(D1:D10,{"C","D",""},R1:R10))

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)
 
C

Carim

Hi Ashley,

With an array formula ( Ctrl+Shift+Enter and not just Enter )
adjust ranges to your needs ...

=SUM(IF(S2:S20="D",R2:R20))

HTH

Cheers
Carim
 
Top