Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Combining several arrays into one formula

Status
Not open for further replies.

ScorchedLemonade

Technical User
Oct 24, 2002
27
US

Hi,

I'm wanting to write a formula of the following type:

=sum(if(Sheet1!C1:C200&Sheet1!D1:D200=A1&B1,Sheet1!B1:B200*index(Sheet2!B1:B100,MATCH(Sheet1!A1:A200,Sheet2!A1:A100,0)),0))

or alternatively

=sumproduct(if(Sheet1!C1:C200&Sheet1!D1:D200=A1&B1,Sheet1!B1:B200,0),index(Sheet2!B1:B100,MATCH(Sheet1!A1:A200,Sheet2!A1:A100,0)),0))

but it looks like Excel refuses to run through the last of the 3 arrays of the same size (namely Sheet1!A1:A200), just taking the first one.

Is there a way I can get around this? I tried in the last of these arrays to & it with an array of the same size but filled with empty cells to try to force Excel into knowing there are 3 arrays involved here, but didn't see anything.
 

Not a problem anymore. It was figured out by a guy here at work. Thanks anyway to anyone who may have spent time on this. (Ultimately the solution involved writing a custom function to take care of part of the array problem.)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top