LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #14   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 26
Default match in multi-column and multi-row array

Thanks to both of you for the guidance. I ended up using the method
suggested by Pete. It was exactly what I was looking for. Lots of
good learnings packed in that solution. No issue with speed.




Pete_UK wrote:
Thanks, RD - so what I'd read about MATCH being quick (I think it was
on the Decision Models site) seems to be true !!

I think this slight variation in the formulae should be quicker still:

B1: =CHAR(MATCH(A1,Sheet1!A$1:D$1)+64)
C1: =IF(ISNA(MATCH(A1,INDIRECT("Sheet1!"&B1&":"&B1),0) ),FALSE*,TRUE)

Hopefully the OP will be able to try it out and report back.

Hope this helps.

Pete

RagDyer wrote:
In duplicating the exact OP conditions, both formulas take approximately the
same time to calculate IF a single value is changed in the 1000 row list ...
BUT ... to build the formulas in the adjoining column ... there was a
gigantic time difference.

Your 2 columns of formulas filled down in approx. 3 or 4 seconds.
The single Sumproduct column took in excess of *5 minutes*.

When changing a block of values (25) in the 1000 row list, your formulas
took maybe 2 seconds, while the Sumproduct took about 15 seconds.

I would say that your suggested formulas are definitely the better way to
go.<g
--
Regards,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------
"Pete_UK" wrote in message
oups.com...
I've just re-read what the OP has - 1000 values in another sheet, so
assume the data is on Sheet1 and the 1000 values in A1 to A1000, with
these formula in B1 and C1:

B1: =MATCH(A1,Sheet1!A$1:D$1)
C1:
=IF(ISNA(MATCH(A1,INDIRECT("Sheet1!"&CHAR(B1+64)&" :"&CHAR(B1+64)),0)),FALSE,TRUE)

Then copy these down to row 1000 - it takes about 4 - 5 seconds to
recalculate.

Hope this helps - he's probably gone to bed by now !! <bg

Pete

Pete_UK wrote:
I put 1 in A1 and then incremented this by 3 down columns A to D to
simulate what I think the OP has (or should have).

F1 is for the number to be found, with this formula in G1:

=MATCH(F1,A1:D1)

and this formula in H1:

=MATCH(F1,INDIRECT(CHAR(G1+64)&":"&CHAR(G1+64)),0)

This returns #N/A if the number in F1 is not found (easily trapped with
IF(ISNA( ... etc) and the row number that the number is on if the
sought-number is present. The response is instant (well I can't detect
any delay after entering a new number in F1).

I think the OP wanted a True or False result, so change the formula in
H1 to:

=IF(ISNA(MATCH(F1,INDIRECT(CHAR(G1+64)&":"&CHAR(G1 +64)),0)),FALSE,TRUE)

and hide column G.

Hope this helps.

Pete

RagDyer wrote:
If you could eliminate a *single* row, the Sumproduct formula would do
the
trick:

=SUMPRODUCT(--(Sheet2!$A$2:$D$65536=A1))<0

This calculates in *less* then 4 seconds!
--
Regards,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit
!
---------------------------------------------------------------------------
"sloth" wrote in message
oups.com...
And yes it can be sorted.

sloth wrote:
The data is in A1:D65536. The data is sorted ascending.



 
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
Multi Column Sum and conditions kalim Excel Worksheet Functions 1 May 23rd 06 03:06 PM
multi column of sumif birdsting Excel Worksheet Functions 3 May 17th 06 01:10 PM
How do I seperate data in one column into multi columns Confused in Streator Excel Worksheet Functions 2 March 3rd 06 09:30 PM
Multi column Drop-down tables. Vanguard Excel Worksheet Functions 0 November 3rd 05 12:57 PM
representing multi category in a column chart hokum Charts and Charting in Excel 2 July 6th 05 01:03 PM


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