Matt
Matt

Reputation: 15061

Excel VLOOKUP SUM with separate tab

Trying to get a simple VLOOKUP to work but only getting first value.

Sample Data

TABA

     V
1
2    1
3    X

X = =SUM(VLOOKUP(V2,TABB!$K:$M,3,FALSE))

TABB

     K  L      M
1    1  Hello  45
2    8  Hello  30   
3    1  Hello  20
4    6  Hello  60
5    1  Hello  90
6    3  Hello  10
7    1  Hello  80
8    1  Hello  75

Current Output

=SUM(VLOOKUP(V2,TABB!$K:$M,3,FALSE))

Is returning 45 (the first value).

Expected Output

=SUM(VLOOKUP(V2,TABB!$K:$M,3,FALSE))

I want it to return 310 (the SUM of values that match 1).

Upvotes: 0

Views: 81

Answers (1)

mondaymorning
mondaymorning

Reputation: 56

Vlookup can only return the first value.

In your TABB Sheet. Create another column in Column N e.g in N1 with

=SUMIF($K$1:$K$8,$K1,$M$1:$M$8)

Drag the formula down

Then do

Vlookup(V2,TABB!$K:$N,4,FALSE)

If this works can you please vote up. :) All the best

Upvotes: 1

Related Questions