Vlookup summing

kikik

New Member
Joined
Dec 19, 2005
Messages
31
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.
 

Some videos you may like

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
Joined
Mar 17, 2004
Messages
19,958
Office Version
  1. 365
  2. 2010
Platform
  1. Windows
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
Joined
Aug 15, 2002
Messages
1,961
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
Joined
Dec 19, 2005
Messages
31

ADVERTISEMENT

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
Joined
Feb 16, 2002
Messages
8,458
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
Joined
Aug 15, 2002
Messages
1,961
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.
 

Watch MrExcel Video

Forum statistics

Threads
1,118,530
Messages
5,572,706
Members
412,481
Latest member
nhantam
Top