Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 13
Default vlookup & sum? or maybe summing dupes?

I have two separate worksheets with lists of accounts. Some accounts are on
both worksheets, and some accounts exist only on one worksheet.

My goal is to create a third worksheet with a master list of accounts that
also sums the values of any accounts that appear on both worksheets.

Would this involve summing VLOOKUPs, or is there a quicker way of pasting
both lists onto the third worksheet and then summing dupes?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,365
Default vlookup & sum? or maybe summing dupes?

I see a couple of ways of doing this. Neither involves VLOOKUP :-).

VLOOKUP() will only find the first entry for the match request, so if an
account appears more than once in any list, it only finds the first one.

#1 - Look at using SUMIF(). You say "worksheets" with my emphasis on
worksheets, so I'm assuming that the sheets reside in the same workBOOK (.xls
file).
On a 3rd sheet you could use column A to enter account numbers into, perhaps
even a Validated Data list to pick from. Or entries for each account on
separate rows. No matter, but say your list/entry is in A2. Then in B2 you
could put a formula similar to this:
=SUMIF(Sheet1!A$1:A$150,A2,Sheet1!B$1:B$150)+SUMIF (Sheet2!A$1:A$555,A2,Sheet2!B$1:B$555)

That formula assumes that the list on Sheet1 goes from row 1 down to 150,
and on Sheet2 it extends from row 1 to row 555.

You could even rewrite it to not have to worry when the length of the lists
grow:
=SUMIF(Sheet1!A:A,A2,Sheet1!B:B)+SUMIF(Sheet2!A:A, A2,Sheet2!B:B)

That's 2, there's a third involving SUMPRODUCT() but I think that's overkill
in this situation.

Hope this helps with your solution.
"blswes" wrote:

I have two separate worksheets with lists of accounts. Some accounts are on
both worksheets, and some accounts exist only on one worksheet.

My goal is to create a third worksheet with a master list of accounts that
also sums the values of any accounts that appear on both worksheets.

Would this involve summing VLOOKUPs, or is there a quicker way of pasting
both lists onto the third worksheet and then summing dupes?

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
macro for dupes shaji Excel Discussion (Misc queries) 2 June 17th 08 04:51 PM
summing all results in a vlookup Valerie Excel Worksheet Functions 2 July 30th 07 10:19 PM
Checking for Dupes TKnTexas Excel Discussion (Misc queries) 4 November 3rd 06 02:43 AM
Summing vlookup cells John K Excel Worksheet Functions 3 October 17th 06 06:40 PM
Summing using VLOOKUP rusty24 Excel Discussion (Misc queries) 2 April 20th 06 02:44 PM


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

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

About Us

"It's about Microsoft Excel"