Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
kestrel
 
Posts: n/a
Default Sum & Lookup function


Hi,

My brains gone blank... I want to combine a lookup with a sum
function.

A B
Apple 22
Pear 40
Orange 35
Apple 10
Peach 14


So say I wanted the total amount of 'Apple' from column B (which in
this case would be 32).

Thanks

Kestrel


--
kestrel
------------------------------------------------------------------------
kestrel's Profile: http://www.excelforum.com/member.php...o&userid=19082
View this thread: http://www.excelforum.com/showthread...hreadid=553552

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bob Phillips
 
Posts: n/a
Default Sum & Lookup function

=SUMIF(A:A,"Apple",B:B)

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"kestrel" wrote in
message ...

Hi,

My brains gone blank... I want to combine a lookup with a sum
function.

A B
Apple 22
Pear 40
Orange 35
Apple 10
Peach 14


So say I wanted the total amount of 'Apple' from column B (which in
this case would be 32).

Thanks

Kestrel


--
kestrel
------------------------------------------------------------------------
kestrel's Profile:

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



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
kestrel
 
Posts: n/a
Default Sum & Lookup function


Thanks, but I have a problem with this formula.

I am using this function to calculate the sums from another
spreadsheet.
The function will work when the other spreadsheet is open, but will not
work when the spreadsheets are closed.


--
kestrel
------------------------------------------------------------------------
kestrel's Profile: http://www.excelforum.com/member.php...o&userid=19082
View this thread: http://www.excelforum.com/showthread...hreadid=553552

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
CLR
 
Posts: n/a
Default Sum & Lookup function

If you don't want to open the other file, then you can always link the data
in to the current file.

='C:\[YourOtherFilename.xls]Sheet1'!A1

Vaya con Dios,
Chuck, CABGx3



"kestrel" wrote:


Thanks, but I have a problem with this formula.

I am using this function to calculate the sums from another
spreadsheet.
The function will work when the other spreadsheet is open, but will not
work when the spreadsheets are closed.


--
kestrel
------------------------------------------------------------------------
kestrel's Profile: http://www.excelforum.com/member.php...o&userid=19082
View this thread: http://www.excelforum.com/showthread...hreadid=553552


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bob Phillips
 
Posts: n/a
Default Sum & Lookup function

For a closed workbook, try

=SUMPRODUCT(--('workbook_path\[workbook_name.xls]Sheet1'!$A$2:$A$100="Apple"
),'workbook_path\[workbook_name.xls]Sheet1'!$F$4:$F$18)

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"kestrel" wrote in
message ...

Thanks, but I have a problem with this formula.

I am using this function to calculate the sums from another
spreadsheet.
The function will work when the other spreadsheet is open, but will not
work when the spreadsheets are closed.


--
kestrel
------------------------------------------------------------------------
kestrel's Profile:

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





  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Aladin Akyurek
 
Posts: n/a
Default Sum & Lookup function

Switch to SumProduct if you want to work with a closed workbook:

=SUMPRODUCT(([kestrel.xls]Sheet1!$A$2:$A$6=A2)+0,[kestrel.xls]Sheet1!$B$2:$B$6)

where kestrel.xls is the workbook of interest with data in A2:B2 on
Sheet1 and A2 houses a condition like Apple in the werkbook where you
want to carry the desired calculation.

kestrel wrote:
Thanks, but I have a problem with this formula.

I am using this function to calculate the sums from another
spreadsheet.
The function will work when the other spreadsheet is open, but will not
work when the spreadsheets are closed.


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
numerical integration integreat Excel Discussion (Misc queries) 4 May 12th 06 02:40 AM
Lookup Function help marlea Excel Discussion (Misc queries) 2 August 23rd 05 07:30 PM
Lookup Function Problems FFW Excel Worksheet Functions 2 August 21st 05 04:22 PM
lookup function 1 Colboyfx Excel Worksheet Functions 4 July 15th 05 09:15 AM
How do I use 3 cells to create the string for a lookup function? Bencomo Excel Worksheet Functions 1 May 15th 05 07:17 AM


All times are GMT +1. The time now is 04:14 AM.

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"