Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 96
Default Formula Question

I need to do some type of lookup and sum in vba
I'd like to use Total Sheet.B5 to return the value

Total Sheet.B5 to = 55 if Total Sheet.A5 = Orange


Total Sheet
A5 = Orange B5 = 55

Sheet 1
A4 = Blue b4 = 5
A5 = Green b5 = 10
A6 = Orange b6 = 15

Sheet 2
A4 = Orange b4 = 10
A5 = Green b5 = 20
A6 = Blue b6 = 30


Sheet 4
A4 = Green b4 = 20
A5 = Orange b5 = 30
A6 = Blue b6 = 40

Thank you for any help
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,836
Default Formula Question

Hummm, I can't really tell what you're doing, but look he
http://www.xldynamic.com/source/xld.SUMPRODUCT.html

I'm pretty confident that your answer is in there.

--
Ryan---
If this information was helpful, please indicate this by clicking ''Yes''.


"Qaspec" wrote:

I need to do some type of lookup and sum in vba
I'd like to use Total Sheet.B5 to return the value

Total Sheet.B5 to = 55 if Total Sheet.A5 = Orange


Total Sheet
A5 = Orange B5 = 55

Sheet 1
A4 = Blue b4 = 5
A5 = Green b5 = 10
A6 = Orange b6 = 15

Sheet 2
A4 = Orange b4 = 10
A5 = Green b5 = 20
A6 = Blue b6 = 30


Sheet 4
A4 = Green b4 = 20
A5 = Orange b5 = 30
A6 = Blue b6 = 40

Thank you for any help

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 225
Default Formula Question

in B5:
=SUMIF(Sheet1!$A$4:$A$6,A5,Sheet1!$B$4:$B$6)+SUMIF (Sheet2!$A$4:$A
$6,A5,Sheet2!$B$4:$B$6)+SUMIF(Sheet4!$A$4:$A$6,A5, Sheet4!$B$4:$B$6)

is the best I can manage, though it gets ugly if you add more sheets.

Unfortunately SUMIF doesn't work across multiple sheets, otherwise you
could use
=SUMIF(Sheet1:Sheet4!$A$4:$A$6,A5,Sheet1:Sheet4!$B $4:$B$6)
but this gives #VALUE!





On 6 Apr, 16:30, Qaspec wrote:
I need to do *some type of lookup and sum in vba
I'd like to use Total Sheet.B5 to return the value

Total Sheet.B5 to = 55 if Total Sheet.A5 = Orange

Total Sheet
A5 = Orange *B5 = 55

Sheet 1
A4 = Blue * * * * * *b4 = 5
A5 = Green * * * * b5 = 10
A6 = Orange * * * b6 = 15

Sheet 2
A4 = Orange * * *b4 = 10
A5 = Green * * * *b5 = 20
A6 = Blue * * * * *b6 = 30

Sheet 4
A4 = Green * * * b4 = 20
A5 = Orange * * b5 = 30
A6 = Blue * * * * *b6 = 40 *

Thank you for any help


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
Newbie Formula Question - how to get formula to repeat in each subsequent row? [email protected] New Users to Excel 2 January 10th 10 05:02 PM
formula question Michele Excel Discussion (Misc queries) 2 July 11th 07 07:22 PM
Newbie Question - Subtraction Formula Question [email protected] Excel Discussion (Misc queries) 3 May 5th 06 05:50 PM
I get error with "ROWS" in the formula - nested formula question Marie J-son Excel Worksheet Functions 0 January 4th 06 01:55 PM
Formula question danlinksman Excel Discussion (Misc queries) 6 July 6th 05 03:58 AM


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