ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Small help with vlookup and sum (https://www.excelbanter.com/excel-worksheet-functions/70641-small-help-vlookup-sum.html)

Aniab

Small help with vlookup and sum
 

This is what I'm trying to accomplish:
Lets say one sheet has this data:
Apple 10
Apple 10
Apple 12
Pear 23
I'd like to be able to have a function on sheet 2 that sums ALL the
numbers linked to the Apples:
Apples 32
Pears 23
etc.
I tried with VLookup, but it only returns a single value. Is there any
way to make it to return the whole sum?

Thanks.


--
Aniab
------------------------------------------------------------------------
Aniab's Profile: http://www.excelforum.com/member.php...o&userid=31374
View this thread: http://www.excelforum.com/showthread...hreadid=510696


Don Guillett

Small help with vlookup and sum
 
have a look in the help index for SUMIF

--
Don Guillett
SalesAid Software

"Aniab" wrote in
message ...

This is what I'm trying to accomplish:
Lets say one sheet has this data:
Apple 10
Apple 10
Apple 12
Pear 23
I'd like to be able to have a function on sheet 2 that sums ALL the
numbers linked to the Apples:
Apples 32
Pears 23
etc.
I tried with VLookup, but it only returns a single value. Is there any
way to make it to return the whole sum?

Thanks.


--
Aniab
------------------------------------------------------------------------
Aniab's Profile:
http://www.excelforum.com/member.php...o&userid=31374
View this thread: http://www.excelforum.com/showthread...hreadid=510696




via135

Small help with vlookup and sum
 

hi!

try this one!

let's assume your data is in sheet1a1:b4!

enter
in sheet2 a1
=sumif(sheet1!a1:a4,"apple",sheet1!b1:b4)

in sheet2 a2
=sumif(sheet1!a1:a4,"pear",sheet1!b1:b4)


regds!

-via135



Aniab Wrote:
This is what I'm trying to accomplish:
Lets say one sheet has this data:
Apple 10
Apple 10
Apple 12
Pear 23
I'd like to be able to have a function on sheet 2 that sums ALL the
numbers linked to the Apples:
Apples 32
Pears 23
etc.
I tried with VLookup, but it only returns a single value. Is there any
way to make it to return the whole sum?

Thanks.



--
via135
------------------------------------------------------------------------
via135's Profile: http://www.excelforum.com/member.php...o&userid=26725
View this thread: http://www.excelforum.com/showthread...hreadid=510696


Aniab

Small help with vlookup and sum
 

Thank you!
That was easy :)

- Ania


--
Aniab
------------------------------------------------------------------------
Aniab's Profile: http://www.excelforum.com/member.php...o&userid=31374
View this thread: http://www.excelforum.com/showthread...hreadid=510696


Kevin Vaughn

Small help with vlookup and sum
 
Assuming you don't really need plurals on sheet 2 (apples and pears vs. apple
pear,) then try this formula:
=SUMIF(Sheet1!$A$1:$A$4,A1,Sheet1!$B$1:$B$4)
If you truly need to need them to be plural then try this array entered
formula (cntl-shift-enter rather than just enter):
=SUM(IF(Sheet1!$A$1:$A$4 & "s" = A3,Sheet1!$B$1:$B$4,0))
--
Kevin Vaughn


"Aniab" wrote:


This is what I'm trying to accomplish:
Lets say one sheet has this data:
Apple 10
Apple 10
Apple 12
Pear 23
I'd like to be able to have a function on sheet 2 that sums ALL the
numbers linked to the Apples:
Apples 32
Pears 23
etc.
I tried with VLookup, but it only returns a single value. Is there any
way to make it to return the whole sum?

Thanks.


--
Aniab
------------------------------------------------------------------------
Aniab's Profile: http://www.excelforum.com/member.php...o&userid=31374
View this thread: http://www.excelforum.com/showthread...hreadid=510696



Lila

Small help with vlookup and sum
 
I just posted a question which is very similar to this and I'm wondering...
is there a way to generate the list of fruit on the second list without
typing it? Kind of like automatically applying a filter?

"Aniab" wrote in
message ...

This is what I'm trying to accomplish:
Lets say one sheet has this data:
Apple 10
Apple 10
Apple 12
Pear 23
I'd like to be able to have a function on sheet 2 that sums ALL the
numbers linked to the Apples:
Apples 32
Pears 23
etc.
I tried with VLookup, but it only returns a single value. Is there any
way to make it to return the whole sum?

Thanks.


--
Aniab
------------------------------------------------------------------------
Aniab's Profile:

http://www.excelforum.com/member.php...o&userid=31374
View this thread: http://www.excelforum.com/showthread...hreadid=510696




Don Guillett

Small help with vlookup and sum
 
glad to help

--
Don Guillett
SalesAid Software

"Aniab" wrote in
message ...

Thank you!
That was easy :)

- Ania


--
Aniab
------------------------------------------------------------------------
Aniab's Profile:
http://www.excelforum.com/member.php...o&userid=31374
View this thread: http://www.excelforum.com/showthread...hreadid=510696





All times are GMT +1. The time now is 05:52 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com