Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Stan Altshuller
 
Posts: n/a
Default Match Function arguments

Hi All

I am trying to use the match function in order to find a look up value
(text) in an array of strings.
If there is an exact match, I need to return the index of the match - no
problem with match(lookup,array,0)
Now, if there is no exact match I need to return the index of the string in
the array that has the same first 3 characters as the look-up value.


EX.

array1:
abc123
abb123
abd123
abf123

lookup value
abb59595

i need the match function to return 2

Any help is greatly appreciated, and thanks for your time in advance!!

Stan



  #2   Report Post  
Peo Sjoblom
 
Posts: n/a
Default

One way

=IF(ISNA(MATCH(C1,A2:A20,0)),MATCH(LEFT(C1,3),LEFT (A2:A20,3),0),MATCH(C1,A2:
A20,0))

entered with ctrl + shift & enter

where C1 = abb123


--

Regards,

Peo Sjoblom


"Stan Altshuller" wrote in message
...
Hi All

I am trying to use the match function in order to find a look up value
(text) in an array of strings.
If there is an exact match, I need to return the index of the match - no
problem with match(lookup,array,0)
Now, if there is no exact match I need to return the index of the string

in
the array that has the same first 3 characters as the look-up value.


EX.

array1:
abc123
abb123
abd123
abf123

lookup value
abb59595

i need the match function to return 2

Any help is greatly appreciated, and thanks for your time in advance!!

Stan





  #3   Report Post  
Bob Phillips
 
Posts: n/a
Default

Stan,

Try this

=MATCH(LEFT("abb5656",3),LEFT(A1:A10,3),0)

which is an array, so commit with Ctrl-Shift-Enter

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Stan Altshuller" wrote in message
...
Hi All

I am trying to use the match function in order to find a look up value
(text) in an array of strings.
If there is an exact match, I need to return the index of the match - no
problem with match(lookup,array,0)
Now, if there is no exact match I need to return the index of the string

in
the array that has the same first 3 characters as the look-up value.


EX.

array1:
abc123
abb123
abd123
abf123

lookup value
abb59595

i need the match function to return 2

Any help is greatly appreciated, and thanks for your time in advance!!

Stan





  #4   Report Post  
Aladin Akyurek
 
Posts: n/a
Default

=MATCH(LEFT(LookupValue,3)&"*",MatchRange,0)

Stan Altshuller wrote:
Hi All

I am trying to use the match function in order to find a look up value
(text) in an array of strings.
If there is an exact match, I need to return the index of the match - no
problem with match(lookup,array,0)
Now, if there is no exact match I need to return the index of the string in
the array that has the same first 3 characters as the look-up value.


EX.

array1:
abc123
abb123
abd123
abf123

lookup value
abb59595

i need the match function to return 2

Any help is greatly appreciated, and thanks for your time in advance!!

Stan



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 function JayL Excel Worksheet Functions 0 March 5th 05 01:27 AM
Match function selecting first value it matches on exactly Paul K. Excel Worksheet Functions 1 February 24th 05 08:57 PM
Need help on index and match function Susan Hayes Excel Worksheet Functions 2 December 22nd 04 10:31 PM
Offset, indirect, match function limitation on linked worksheets. NewAlgier Excel Worksheet Functions 1 December 6th 04 11:55 PM
Event hundler to control the Excel function arguments Yattabi Excel Worksheet Functions 0 December 6th 04 10:41 PM


All times are GMT +1. The time now is 07:05 PM.

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"