Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 6
Default Add up all numbers in VLOOKUP that has identical lookup value

Maybe VLOOKUP is not the best function to use; but I want to pull ALL numbers
associated with a person's name and have them added to one cell.

Example:

A B C D
1 LName FName Dept Hours
2 Smith Brandon 2114 85
3 Smith Brandon 0277 110

The above shows what the data would look like on the sheet entitled JAN. I
want the data on another page, so the cell would contain all the hours that
Brandon Smith worked in one month. Not sure VLOOKUP is the correct solution.

Thanks for any help that can be provided.

Steve

--
Message posted via http://www.officekb.com

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default Add up all numbers in VLOOKUP that has identical lookup value

Take a look SUMIF function in Help menu


"ssolomon via OfficeKB.com" wrote:

Maybe VLOOKUP is not the best function to use; but I want to pull ALL numbers
associated with a person's name and have them added to one cell.

Example:

A B C D
1 LName FName Dept Hours
2 Smith Brandon 2114 85
3 Smith Brandon 0277 110

The above shows what the data would look like on the sheet entitled JAN. I
want the data on another page, so the cell would contain all the hours that
Brandon Smith worked in one month. Not sure VLOOKUP is the correct solution.

Thanks for any help that can be provided.

Steve

--
Message posted via http://www.officekb.com


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Add up all numbers in VLOOKUP that has identical lookup value

Try this:

=SUMPRODUCT(--(Jan!A2:A10="Smith"),--(Jan!B2:B10="Brandon"),Jan!D2:D10)

Better if you use cells to hold the criteria:

A1 = Smith
B1 = Brandon

=SUMPRODUCT(--(Jan!A2:A10=A1),--(Jan!B2:B10=B1),Jan!D2:D10)

--
Biff
Microsoft Excel MVP


"ssolomon via OfficeKB.com" <u39090@uwe wrote in message
news:7b8f49fc2d909@uwe...
Maybe VLOOKUP is not the best function to use; but I want to pull ALL
numbers
associated with a person's name and have them added to one cell.

Example:

A B C D
1 LName FName Dept Hours
2 Smith Brandon 2114 85
3 Smith Brandon 0277 110

The above shows what the data would look like on the sheet entitled JAN.
I
want the data on another page, so the cell would contain all the hours
that
Brandon Smith worked in one month. Not sure VLOOKUP is the correct
solution.

Thanks for any help that can be provided.

Steve

--
Message posted via http://www.officekb.com



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 6
Default Add up all numbers in VLOOKUP that has identical lookup value

Valko -

Thanks!! I was looking at the SUMIF in the help and was still having
problems. I put this in and it worked perfectly.

Thanks a bunch!!

Steve

T. Valko wrote:
Try this:

=SUMPRODUCT(--(Jan!A2:A10="Smith"),--(Jan!B2:B10="Brandon"),Jan!D2:D10)

Better if you use cells to hold the criteria:

A1 = Smith
B1 = Brandon

=SUMPRODUCT(--(Jan!A2:A10=A1),--(Jan!B2:B10=B1),Jan!D2:D10)

Maybe VLOOKUP is not the best function to use; but I want to pull ALL
numbers

[quoted text clipped - 17 lines]

Steve


--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...tions/200711/1



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Add up all numbers in VLOOKUP that has identical lookup value

If evey last name was unique (distinct) then you could use SUMIF:

=SUMIF(Jan!A2:A10,"Smith",Jan!D2:D10)

However, if you have:

Smith...Brandon
Smith...Joe

Then SUMIF will sum *every* Smith.

Thanks for the feedback!

--
Biff
Microsoft Excel MVP


"ssolomon via OfficeKB.com" <u39090@uwe wrote in message
news:7b90166c85320@uwe...
Valko -

Thanks!! I was looking at the SUMIF in the help and was still having
problems. I put this in and it worked perfectly.

Thanks a bunch!!

Steve

T. Valko wrote:
Try this:

=SUMPRODUCT(--(Jan!A2:A10="Smith"),--(Jan!B2:B10="Brandon"),Jan!D2:D10)

Better if you use cells to hold the criteria:

A1 = Smith
B1 = Brandon

=SUMPRODUCT(--(Jan!A2:A10=A1),--(Jan!B2:B10=B1),Jan!D2:D10)

Maybe VLOOKUP is not the best function to use; but I want to pull ALL
numbers

[quoted text clipped - 17 lines]

Steve


--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...tions/200711/1



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel 2002: Can Vlookup search for identical references ? Mr. Low Excel Discussion (Misc queries) 1 July 16th 07 02:52 PM
Lookup of identical values? TobbeGardner Excel Worksheet Functions 3 July 5th 06 10:50 PM
How to lookup when range contains multiple identical entries? Doug Laidlaw Excel Discussion (Misc queries) 1 January 19th 06 12:18 PM
column filtering to match identical numbers sammc2 Excel Discussion (Misc queries) 1 July 14th 05 11:59 PM
Can VLOOKUP return multiple answers based on several identical lo. jddtct Excel Worksheet Functions 3 January 11th 05 07:03 AM


All times are GMT +1. The time now is 05:43 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"