Sum multiple VLOOKUP values

  • Thread starter Thread starter AFuturePrez
  • Start date Start date
A

AFuturePrez

I have a table with 2 columns:
S 9
M 3
W 1
N 0


I have 9 rows with values of S, M, W or N. I want to add these values
all together in one cell using VLOOKUP.

Thoughts?

Thank you
 
VLOOKUP() does not add up values.

If you really mean:
I have 9 rows with values of S, M, W or N. I want to add these values
all together in one cell

ie sum all values in Column B that have a "S", "M","W" or "N" in Column A
then try:

=SUMPRODUCT((A2:A10={"S","M","W","N"})*(B2:B10))

If you mean to add the various letters separately then use:

=SUMIF(A2:A10,"S",B2:B10)

etc.

--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings

(e-mail address removed)
Replace @mailinator.com with @tiscali.co.uk
 
Use SUMIF, why would you want to use VLOOKUP?

--

Regards,

Peo Sjoblom







- Show quoted text -

The formula was longer than the cell would accept because of the
multiple nested if formulas needed.
 
VLOOKUP() does not add up values.

If you really mean:


ie sum all values in Column B that have a "S", "M","W" or "N" in Column A
then try:

=SUMPRODUCT((A2:A10={"S","M","W","N"})*(B2:B10))

If you mean to add the various letters separately then use:

=SUMIF(A2:A10,"S",B2:B10)

etc.

--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings

(e-mail address removed)
Replace @mailinator.com with @tiscali.co.uk







- Show quoted text -
Thank you for your help.
I appreciate your rapid response.
 
You are very welcome.

--

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings

(e-mail address removed)
Replace @mailinator.com with @tiscali.co.uk


VLOOKUP() does not add up values.

If you really mean:


ie sum all values in Column B that have a "S", "M","W" or "N" in Column A
then try:

=SUMPRODUCT((A2:A10={"S","M","W","N"})*(B2:B10))

If you mean to add the various letters separately then use:

=SUMIF(A2:A10,"S",B2:B10)

etc.

--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings

(e-mail address removed)
Replace @mailinator.com with @tiscali.co.uk







- Show quoted text -
Thank you for your help.
I appreciate your rapid response.
 
Back
Top