Google Answers Logo
View Question
 
Q: Excel macro/function like VLOOKUP that sums eventual multiple matches ( No Answer,   2 Comments )
Question  
Subject: Excel macro/function like VLOOKUP that sums eventual multiple matches
Category: Computers > Algorithms
Asked by: irluca2005-ga
List Price: $5.00
Posted: 30 May 2006 07:45 PDT
Expires: 30 May 2006 14:32 PDT
Question ID: 733646
I need a simple Excel macro or function that works like the VLOOKUP
function but sums eventual multiple matches.

Example:

Sheet1 - before execution:
DOG   | WHITE
HOUSE | YELLOW
CAT   | GRAY

Sheet2 - before execution:
HOUSE | 300
DOG   | 780
DOG   | 200
BALL  | 560

Sheet1 - AFTER execution:
DOG   | WHITE  | 980
HOUSE | YELLOW | 300
CAT   | GRAY   |
Answer  
There is no answer at this time.

Comments  
Subject: Re: Excel macro/function like VLOOKUP that sums eventual multiple matches
From: statistics-ga on 30 May 2006 10:23 PDT
 
HERE IS THE COMPLETE SOLUTION:

What you really want is called a SUMIF function.
In your Sheet1 cell C1, enter the following formula:
=SUMIF(Sheet2!$A$1:$A$4,A1,Sheet2!$B$1:$B$4)
and then just copy the formula down.
Subject: Re: Excel macro/function like VLOOKUP that sums eventual multiple matches
From: irluca2005-ga on 30 May 2006 14:32 PDT
 
Excellent! it works!
Thank you very much!

Luca

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy