VLOOKUP with multiple references?

G

gorkyness

A 1
B 10
C 100
A 1000

Is there a way I can get a VLOOKUP function on "A" to get the sum o
both values (1 + 1000)? I can't change the data itself
 
P

Peo Sjoblom

Use sumif

=SUMIF(Range1,"A",Range2)

--
For everyone's benefit keep the discussion in the newsgroup.

Regards,

Peo Sjoblom
 
T

Trevor Shuttleworth

Think you need SUMIF rather than VLOOKUP.

For example:

=SUMIF(A1:A4,"A",B1:B4)

or, if there's no other data under the range to be checked, you could have:

=SUMIF(A:A,"A",B:B)

Regards

Trevor
 
T

Trevor

can you create a second group of cells, using the SUMIF function, which you
use as the range that you reference in your lookup?

If your example, below, was in columns A and B, then you could create a
column C which contains the unique values from column A, and then enter the
following formula in column D and copy it down the column:
=SUMIF(A$1:A$4,C1,B$1:B$4).

Now use columns C and D in your VLOOKUP instead of A and B
 
Top