Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Aniab
 
Posts: n/a
Default 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

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
via135
 
Posts: n/a
Default 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

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Aniab
 
Posts: n/a
Default 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

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Kevin Vaughn
 
Posts: n/a
Default 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




  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Lila
 
Posts: n/a
Default 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



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



All times are GMT +1. The time now is 11:56 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"