+ Reply to Thread
Results 1 to 7 of 7

How to return a value from a different row

  1. #1
    Registered User
    Join Date
    06-06-2013
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    9

    How to return a value from a different row

    I am trying to do the following:

    I have a series of columns with dates in first column and values in column 3 and 5.

    I want to check if date in first column matches my criteria and then return a value from column 3 but from a row below. I want to do this for column 5 also.

    Vlookup does not work because it returns value from the same row.

    What are some solutions ?

    Suman

  2. #2
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: How to return a value from a different row

    Use Index Match instead of vlookup, and offset the rows..

    Standard vlookup

    =VLOOKUP(A1,'Other Sheet'!A1:B100,2,FALSE)

    now you want to do the same thing, but return the value from 1 row below the match..

    =INDEX('Other Sheet'!B$2:B$101,MATCH(A1,'Other Sheet'!$A$1:$A$100,0))

    Notice the offset by 1 row between the 2 ranges.

  3. #3
    Registered User
    Join Date
    06-06-2013
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: How to return a value from a different row

    I need to input a value for the column number for INDEX I believe - it's returning a #NA error.

    =INDEX('Other Sheet'!B$2:B$101,MATCH(A1,'Other Sheet'!$A$1:$A$100,0))

  4. #4
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: How to return a value from a different row

    No, you don't need a column Number with Index/Match.
    Instead, you put the actual column reference that you want to 'return' a value from based on where the match was found.

    If it's returning #N/A, it's because there was no exact match to A1 in the other sheet column A


    Can you post a current formula that does what you want (except you want 1 row down)?

  5. #5
    Registered User
    Join Date
    06-06-2013
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: How to return a value from a different row

    Here is the vlookup version

    VLOOKUP(Main!$B$1,'Calendar '!$E$30:$I$147,5,FALSE)

    As you can see, it's a 5 column array and I want to check if column 1 has the correct matching date and then return a value from the 5th column but 1 row down

  6. #6
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: How to return a value from a different row

    Try

    =INDEX('Calendar '!$I$31:$I$148,MATCH(Main!$B$1,'Calendar '!$E$30:$E$147,0))

  7. #7
    Registered User
    Join Date
    06-06-2013
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: How to return a value from a different row

    Thanks Jon. That works.

+ 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