+ Reply to Thread
Results 1 to 9 of 9

Want VLookup to Return the row above

  1. #1
    JoOwl0
    Guest

    Want VLookup to Return the row above

    I have the VLOOKUP function:
    =VLOOKUP(G1360,D4:G1358,COLUMNS(D1:G1))

    which is properly returning the value in row G which corresponds to the
    value in G1360. How do I get it to return the value in the row above
    the row which has the value in G1360?


  2. #2
    JoOwl0
    Guest

    Re: Want VLookup to Return the row above

    Replace with:
    I have the VLOOKUP function:
    =VLOOKUP(G1360,D4:G1358,COLUMNS(D1:G1))

    which is properly returning the value in some row which corresponds to
    the value in G1360. How do I get it to return the value in the row
    above the row which has the value in G1360?
    Hanging red-faced head.....


  3. #3
    Niek Otten
    Guest

    Re: Want VLookup to Return the row above

    =INDEX(D4:G1358,MATCH(G1360,D4:G1358)-1,COLUMNS(D1:G1))

    --

    Kind Regards,

    Niek Otten

    Microsoft MVP - Excel

    "JoOwl0" <JoOwl@att.net> wrote in message
    news:1114265954.986154.226660@z14g2000cwz.googlegroups.com...
    >I have the VLOOKUP function:
    > =VLOOKUP(G1360,D4:G1358,COLUMNS(D1:G1))
    >
    > which is properly returning the value in row G which corresponds to the
    > value in G1360. How do I get it to return the value in the row above
    > the row which has the value in G1360?
    >




  4. #4
    JoOwl0
    Guest

    Re: Want VLookup to Return the row above

    Oops, that gives #NA.
    =INDEX(D4:G1358,MATCH(G1360,D4:G1358)-1,COLUMNS(D1:G1))
    But thanks anyway


  5. #5
    Ron Rosenfeld
    Guest

    Re: Want VLookup to Return the row above

    On 23 Apr 2005 07:24:55 -0700, "JoOwl0" <JoOwl@att.net> wrote:

    >Replace with:
    >I have the VLOOKUP function:
    >=VLOOKUP(G1360,D4:G1358,COLUMNS(D1:G1))
    >
    >which is properly returning the value in some row which corresponds to
    >the value in G1360. How do I get it to return the value in the row
    >above the row which has the value in G1360?
    >Hanging red-faced head.....


    I don't think you can. However, you could use INDEX and MATCH to do that:

    =INDEX(D4:G1358,MATCH(G1360,D4:D1358,0)-1,COLUMNS(D1:G1))


    --ron

  6. #6
    Niek Otten
    Guest

    Re: Want VLookup to Return the row above

    Sorry,

    =INDEX(D4:G1358,MATCH(G1360,D4:D1358)-1,COLUMNS(D1:G1))

    --

    Kind Regards,

    Niek Otten

    Microsoft MVP - Excel


    "JoOwl0" <JoOwl@att.net> wrote in message
    news:1114267357.927728.75200@l41g2000cwc.googlegroups.com...
    > Oops, that gives #NA.
    > =INDEX(D4:G1358,MATCH(G1360,D4:G1358)-1,COLUMNS(D1:G1))
    > But thanks anyway
    >




  7. #7
    JoOwl0
    Guest

    Re: Want VLookup to Return the row above

    =INDEX(D4:G1358,MATCH(G1360,D4:D1358,0)-1,COLUMNS(D1:G1))
    Thanks, Ron, it worked a charm!


  8. #8
    JoOwl0
    Guest

    Re: Want VLookup to Return the row above

    Thanks, I should have looked more carefully and seen the problem myself.


  9. #9
    Ron Rosenfeld
    Guest

    Re: Want VLookup to Return the row above

    On 23 Apr 2005 07:49:46 -0700, "JoOwl0" <JoOwl@att.net> wrote:

    >=INDEX(D4:G1358,MATCH(G1360,D4:D1358,0)-1,COLUMNS(D1:G1))
    >Thanks, Ron, it worked a charm!



    Glad to help. Thanks for the feedback


    --ron

+ 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