Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Array advance sum formula

=Sum(((Range1=value1/cell1)+(Range1=value2/cell2))*(Range2)
The above formula works fine it will sum Range2 where values in Range1 are
matching with cell1/value1 OR cell2/value.
My question is what if i have to compare values in Range1 with 10 or more
cells/values. currently it works by repeating the conditions say 10 times,
but this will make formula much bigger. Is there any way Range1 can be
compared with cell1, cell2,...cell10 at the same time.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 340
Default Array advance sum formula

Try using an array constant if it is a list of values:

=Sumproduct((Range1={value1,value2,...})*Range2)

Sumproduct has the advantage that it does not need to be array-
entered.

For cell references, instead of the array you can use a range such as
A1:E1 or transpose(a1:a5) for a vertical range or
Choose({1,2,3},b2,c5,e7) for a discontinuous range.


On Feb 7, 1:32 pm, Amir Rasheed <Amir
wrote:
=Sum(((Range1=value1/cell1)+(Range1=value2/cell2))*(Range2)
The above formula works fine it will sum Range2 where values in Range1 are
matching with cell1/value1 OR cell2/value.
My question is what if i have to compare values in Range1 with 10 or more
cells/values. currently it works by repeating the conditions say 10 times,
but this will make formula much bigger. Is there any way Range1 can be
compared with cell1, cell2,...cell10 at the same time.



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,726
Default Array advance sum formula

=SUM((ISNUMBER(MATCH(Range1,cell1:celln,0)))*Range 2)

and

=SUM((ISNUMBER(MATCH(Range1,{"value1","value2"},0) ))*Range2)

--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)



"Amir Rasheed" <Amir wrote in message
...
=Sum(((Range1=value1/cell1)+(Range1=value2/cell2))*(Range2)
The above formula works fine it will sum Range2 where values in Range1 are
matching with cell1/value1 OR cell2/value.
My question is what if i have to compare values in Range1 with 10 or more
cells/values. currently it works by repeating the conditions say 10 times,
but this will make formula much bigger. Is there any way Range1 can be
compared with cell1, cell2,...cell10 at the same time.



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
Find value in array Brook6 Excel Worksheet Functions 26 January 30th 07 09:40 PM
Use of Offset function in array formula scabHead Excel Worksheet Functions 4 December 23rd 06 01:16 AM
Formula checking multiple worksheets sonic-the-mouse Excel Worksheet Functions 2 June 5th 05 07:48 PM
Formula checking multiple worksheets sonic-the-mouse Excel Worksheet Functions 2 June 5th 05 03:28 AM
Match / Vlookup within an Array formula Hari Prasadh Excel Discussion (Misc queries) 3 February 3rd 05 04:37 PM


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