+ Reply to Thread
Results 1 to 4 of 4

Index function to return value of row above

  1. #1
    Registered User
    Join Date
    08-01-2013
    Location
    DallasTX
    MS-Off Ver
    Excel 2007
    Posts
    40

    Index function to return value of row above

    Hello,

    If I have a list of names in a range

    Red
    Blue
    Pink
    Orange

    indicated a sequence... (pink always comes before orange)

    and I have a cell in another sheet with value "Orange"... in another cell I'd like to return the value "Pink".
    I need to lookup "orange" in the sequence and return the value of the cell in the row above it.

    Thanks for your help!

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,425

    Re: Index function to return value of row above

    Something like:

    Formula: copy to clipboard
    Please Login or Register  to view this content.



    This copes with the scenario that Red is selected (and Red is in row 1) and if the colour is not found in the table.


    This example is all on one sheet; just adjust to refer to the appropriate sheet.


    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Index function to return value of row above

    Assuming Red, Blue, Pink, Orange in column A on tab1.
    Assuming Red, Blue, Pink, Orange in column A on tab2.

    tab1, b1 =

    Formula: copy to clipboard
    Please Login or Register  to view this content.

  4. #4
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: Index function to return value of row above

    With
    A1:A4 containing your list
    Red
    Blue
    Pink
    Orange

    and
    B1: a value to find...Pink

    This regular formula returns the value prior to the matched value...or..If Red..returns Red
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Is that something you can work with?
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

+ 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. How to: Return next value w/ same # in index match large function?
    By Yoshi in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-06-2015, 02:35 AM
  2. how to return the second occurence with index function ?
    By masterinex in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-23-2013, 10:05 AM
  3. Replies: 4
    Last Post: 03-13-2013, 12:38 PM
  4. Replies: 2
    Last Post: 06-14-2010, 02:04 AM
  5. [SOLVED] Error Return Value from and INDEX(A:2,MATCH()) function
    By BJ in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-26-2005, 11:06 AM

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