# Vlookup summing

#### kikik

##### New Member
I'm using the vlookup to capture financial data from another worksheet. The problem is that some names are listed more than once. I need to sum up all salaries. Ex John Doe listed 3 time with \$5, \$3, and \$2 and need to add them together.

### Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.

#### Scott Huish

##### MrExcel MVP
Not sure what you are using the VLOOKUP for, but perhaps SUMIF:

=SUMIF(Sheet2!A1:A100,"John Doe",Sheet2!B1:B100)

#### Gates Is Antichrist

##### Well-known Member
Try SUMIF. The help item on it explains it pretty well.

#### Gates Is Antichrist

##### Well-known Member
hotpepper, there's nothing wrong with what you said, but I'll mention that when I give sumif examples I usually add the \$ anchors, having myself been beaten up by that so many countless times. ( Generally, I try to condition myself to add them immediately after constructing a SUMIF. Too bad you can't type \$ while entering the formula (that is, when you navigate the ranges). )

#### kikik

##### New Member

THanks sumif works. Can it add columns and rows together?
If have names(could be more than once) in A and and amounts in b,c,d.

#### Brian from Maui

##### MrExcel MVP
kikik said:
THanks sumif works. Can it add columns and rows together?
If have names(could be more than once) in A and and amounts in b,c,d.

Try,

=SUMPRODUCT((\$A\$1:\$A\$10="Name")*(\$B\$1:\$D\$10))

#### Gates Is Antichrist

##### Well-known Member
I don't know what the behavior means when the sum range is not dimensioned precisely the same as the lookup range for SUMIF. I would add several SUMIFs.

Actually, I retract that last lament I made about typing \$. I just remembered that the amazing Aladin identified that you can use the F2 key to toggle navigation and typing.

#### kikik

##### New Member
Thanks works great. This site is the best!

Replies
5
Views
125
Replies
1
Views
348
Replies
1
Views
77
Replies
5
Views
39
Replies
6
Views
118