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? |
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..... |
=INDEX(D4:G1358,MATCH(G1360,D4:G1358)-1,COLUMNS(D1:G1))
-- Kind Regards, Niek Otten Microsoft MVP - Excel "JoOwl0" wrote in message oups.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? |
Oops, that gives #NA.
=INDEX(D4:G1358,MATCH(G1360,D4:G1358)-1,COLUMNS(D1:G1)) But thanks anyway |
On 23 Apr 2005 07:24:55 -0700, "JoOwl0" 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 |
Sorry,
=INDEX(D4:G1358,MATCH(G1360,D4:D1358)-1,COLUMNS(D1:G1)) -- Kind Regards, Niek Otten Microsoft MVP - Excel "JoOwl0" wrote in message ups.com... Oops, that gives #NA. =INDEX(D4:G1358,MATCH(G1360,D4:G1358)-1,COLUMNS(D1:G1)) But thanks anyway |
=INDEX(D4:G1358,MATCH(G1360,D4:D1358,0)-1,COLUMNS(D1:G1))
Thanks, Ron, it worked a charm! |
Thanks, I should have looked more carefully and seen the problem myself.
|
On 23 Apr 2005 07:49:46 -0700, "JoOwl0" 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 |
All times are GMT +1. The time now is 09:21 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com