+ Reply to Thread
Results 1 to 4 of 4

Concatinating inside MATCH

  1. #1
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Concatenating inside MATCH

    Hi All,

    I'm trying to write a MATCH function in which the beginning row of the array (Argument 2) is based on a variable number (i.e. a number I pull from another cell or get through another MATCH statement). It would look something like this;

    =MATCH("rabbit","B"&8:B12,0)

    OR

    =MATCH("rabbit","B"&MATCH("frog", B1:B12,0):B12,0).

    I can do that with INDIRECT[ =INDIRECT("A"&MATCH("Rabbit",$B$1:$B$12,0))]
    but it doesn't seem to work with MATCH. Is there a way to set this up so I can have that first cell in the array vary?

    Thanks in advance.

    ChemistB
    Last edited by shg; 10-29-2007 at 11:27 AM. Reason: title spelling

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    You mean perhaps something like?

    =MATCH("rabbit",INDEX(B1:B12,MATCH("frog", B1:B12,0)):B12,0)
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582
    Thanks NBVC! I think that will do the trick. I'm a little confused as to why it works since if I break it up;

    Please Login or Register  to view this content.
    has the subfunction

    Please Login or Register  to view this content.
    which works out to be "frog" and not B4 like I would expect it to be. Am I missing something or is this one of those "just the way Excel works" kinda things.

    Thanks again.
    ChemistB

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    the Index() function can also return the reference to a cell (See Index help files).

    When put inside another formula such as the one provided, it will return the cell reference not the value in the indexed cell.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1