IF and VLookup

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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?
 
You don't need lookup. Try this:

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

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

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

--
HTH

Bob Phillips

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

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

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)
 
Thank you! I completely forgot about SUMIF

PCLIVE said:
You don't need lookup. Try this:

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

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

HTH,
Paul
 
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
 

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

Back
Top