Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 68
Default Match - Array Problem

I have a workbook with 2 sheets Data and Summary

Col A of Data contains Names and the same names appear more than once.

Col U of Data contains Numbers and the same numbers may appear motre than
once but not against the same name in Col A

In Col A of Summary I have a list of numbers and in cell B1 I have a Name.

In Col B of Summary (from row 2 onwards) I want a formula which returns
whatever is in Data!V1:V5000 where Col A = Data!U1:U5000 and B1 =
Data!A1:A5000


I've tried all sorts of things the latest of which is:
=if(and(=IF(AND($A2=Data!$U$1:$U$5000,B$1=Data!$A$ 1:$A$5000),Data!$V$1:$V$5000,"") entered as an array but none of them work.

Please could someone give me a steer on what I'm doing wrong and how to put
it right.

Many thanks

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,268
Default Match - Array Problem

=INDEX(Data!V1:V5000,MATCH(1,(Data!U1:U5000=A2)*(D ata!A1:A5000=B1),0))

array entered with ctrl + shift & enter

depending on what's in your workbook it be a bit slow

--
Regards,

Peo Sjoblom



"nospaminlich" wrote in message
...
I have a workbook with 2 sheets Data and Summary

Col A of Data contains Names and the same names appear more than once.

Col U of Data contains Numbers and the same numbers may appear motre than
once but not against the same name in Col A

In Col A of Summary I have a list of numbers and in cell B1 I have a Name.

In Col B of Summary (from row 2 onwards) I want a formula which returns
whatever is in Data!V1:V5000 where Col A = Data!U1:U5000 and B1 =
Data!A1:A5000


I've tried all sorts of things the latest of which is:
=if(and(=IF(AND($A2=Data!$U$1:$U$5000,B$1=Data!$A$ 1:$A$5000),Data!$V$1:$V$5000,"")
entered as an array but none of them work.

Please could someone give me a steer on what I'm doing wrong and how to
put
it right.

Many thanks



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 68
Default Match - Array Problem


Many thanks Peo. That works a treat although as you predicted it is a bit
slow as it's a busy workbook.

I assume it can't be done without an array formula in the same way
Sumproduct can be used as an alternative when calculating results?

Thanks again
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,268
Default Match - Array Problem

Sumproduct is not that fast when it works as an array horse like in

sumproduct(--(range1=x),--(range2=y),range3)


Sumproduct could be used in this case if the values that you want to
retrieve in Data!V1:V5000 are numerical? If so use

=SUMPRODUCT(--(Data!U1:U5000=A2),--(Data!A1:A5000=B1),Data!V1:V5000)

which still probably would be slow but most likely faster than the
INDEX(MATCH combo

A much faster option but quite labour intensive to setup would be to use for
instance a hidden column (you would hide it when you are done with the
setup) and use a single formula per row, basically

=IF(AND(Data!U1=$A$2,Data!A1=$B$1),Data!V1,"")

copy down 5000 rows and then simply sum the whole column of help formulas.
That would be much faster than a single array formula


--
Regards,

Peo Sjoblom



"nospaminlich" wrote in message
...

Many thanks Peo. That works a treat although as you predicted it is a bit
slow as it's a busy workbook.

I assume it can't be done without an array formula in the same way
Sumproduct can be used as an alternative when calculating results?

Thanks again



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
Match & array Carmen Excel Worksheet Functions 2 July 31st 07 04:08 AM
array match Mike S Excel Worksheet Functions 6 March 1st 07 03:04 PM
index match array function-returning only first match, need last. Julie Olsen Excel Worksheet Functions 3 December 29th 06 12:50 AM
Match as well as does not match array function Vikram Dhemare Excel Discussion (Misc queries) 7 April 25th 06 09:15 AM
Array index, match problem RAP Excel Worksheet Functions 27 August 21st 05 07:19 PM


All times are GMT +1. The time now is 12:05 AM.

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"