+ Reply to Thread
Results 1 to 6 of 6

How to modify an INDEX MATCH formula over a wider range?

  1. #1
    Forum Contributor
    Join Date
    10-29-2004
    Posts
    291

    How to modify an INDEX MATCH formula over a wider range?

    =INDEX(A:A,MATCH(C1,C:K,0)

    This returns an error. How can I modify it so it tries to find C1 within the C:K range?

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,723

    Re: How to modify an INDEX MATCH formula over a wider range?

    MATCH only looks in a 1-d array (i.e.one column) for a match. Please explain what you are trying to do.

    Pete

  3. #3
    Forum Contributor
    Join Date
    10-29-2004
    Posts
    291

    Re: How to modify an INDEX MATCH formula over a wider range?

    If C1 is found in any of the cells in the same row between C:K then it would return the value in column A for the same row.

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: How to modify an INDEX MATCH formula over a wider range?

    To attach a file to your post,
    click advanced (next to quick post),
    scroll down until you see "manage file",
    click that and select "add files" (top right corner).
    click "select files" find your file, click "open" click "upload" click 'done" bottom right. click "submit reply"

    Once the upload is completed the file name will appear below the input boxes in this window.
    You can then close the window to return to the new post screen.
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  5. #5
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: How to modify an INDEX MATCH formula over a wider range?

    Quote Originally Posted by djarcadian View Post
    =INDEX(A:A,MATCH(C1,C:K,0)

    This returns an error. How can I modify it so it tries to find C1 within the C:K range?
    If that formula did work the result would always be the value of cell A1.

    You want to look in column C for a match of cell C1, so C1 will match C1.

    Try this...

    Data Range
    A
    B
    C
    D
    E
    F
    G
    H
    I
    J
    K
    1
    -----
    XXX
    Here
    2
    3
    4
    5
    This
    aaa
    sss
    ddd
    fff
    eee
    rrr
    ttt
    yyy
    uuu
    6
    That
    dft
    oub
    lol
    ujk
    rrh
    qqq
    ppp
    ooo
    iii
    7
    The
    ww
    y
    rftg
    t
    qw
    oip
    ououu
    iklo
    ghqw
    8
    Other
    w
    kl
    dnjk
    uh
    ewe
    q
    w
    vbcx
    zsxcd
    9
    Here
    wwww
    j
    nmkl
    llllllll
    fghy
    XXX
    fh
    urf
    kpw
    10
    There
    fgty
    hbnj
    fgh
    jntu
    kl
    de
    dghhj
    tghhv
    drthj


    This array formula** entered in D1:

    =INDEX(A:A,MAX((C5:K10=C1)*ROW(C5:K10)))

    ** array formulas need to be entered using the key
    combination of CTRL,SHIFT,ENTER (not just ENTER).
    Hold down both the CTRL key and the SHIFT key
    then hit ENTER.

    In the MAX function...

    MAX((C5:K10=C1)*ROW(C5:K10))

    ...You should avoid using entire columns as range references. Use smaller specific ranges.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  6. #6
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: How to modify an INDEX MATCH formula over a wider range?

    Why not find out where exactly the value is if it is in the range?
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    ....confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer. Press F2 on that cell and try again.

    If the value is found, the cell reference for the value is returned. If the value isn't in the range, Not Found is returned.

    C
    D
    E
    F
    G
    H
    I
    J
    K
    1
    n $E$6
    2
    3
    4
    5
    a g m s y ee kk qq ww
    6
    b h n t z ff ll rr xx
    7
    c i o u aa gg mm ss yy
    8
    d j p v bb hh nn tt zz
    9
    e k q w cc ii oo uu aaa
    10
    f l r x dd jj pp vv bbb
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Use a formula to get range in Index Match
    By IntisarN in forum Excel General
    Replies: 4
    Last Post: 01-29-2015, 03:10 PM
  2. [SOLVED] Reference to named range to be used in index match formula!! Help Please!!
    By Optimum in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 06-24-2013, 06:54 AM
  3. Macro to copy paste if match not found "go to next"
    By HawksOkeyoJr in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-07-2013, 05:28 AM
  4. Index Match formula using range name
    By BBS in forum Excel General
    Replies: 7
    Last Post: 05-20-2009, 09:05 AM
  5. dynamic range for index/match formula
    By excellicious in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 03-29-2008, 07:41 PM

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