Lookup

Peter1973

Well-known Member
Joined
May 13, 2006
Messages
945
I am trying to get a lookup to work differently, I have :

=VLOOKUP(B5,'Order Creation'!$C$6:$P$4004,2,FALSE)

Is it possible for the lookup to return the value not in the corresponding cell in column 2 but in the cell that is 5 across and 5 down so if B5 is found in cell C6 it would return the value in cell G10, Hope this is clear.
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.

Peter_SSs

MrExcel MVP, Moderator
Joined
May 28, 2005
Messages
59,294
Office Version
  1. 365
Platform
  1. Windows
Untested, but is this it?

=INDEX('Order Creation'!G:G,MATCH(B5,'Order Creation'!C:C,0)+4)
 
Upvote 0

Peter1973

Well-known Member
Joined
May 13, 2006
Messages
945
Can you possibly explain how this works as as when I try to change this to look at a different row it gives me very strange results.

Thanks
 
Upvote 0

Aladin Akyurek

MrExcel MVP
Joined
Feb 14, 2002
Messages
85,210
Try...
Code:
=IF(ISNUMBER(MATCH(B5,'Order Creation'!$C$6:$C$4004,0)),
    INDEX('Order Creation'!$H$6:$H$4004,
      MATCH(B5,'Order Creation'!$C$6:$C$4004,0)+5)),
    "Not Found")
 
Upvote 0

Peter_SSs

MrExcel MVP, Moderator
Joined
May 28, 2005
Messages
59,294
Office Version
  1. 365
Platform
  1. Windows
... when I try to change this to look at a different row it gives me very strange results.
Row?:confused: Do you mean column?

Can you possibly explain how this works ...
Sure, I'll try ...

1. MATCH(B5,'Order Creation'!C:C,0)
This looks down column C on 'Order Creation' sheet for the B5 value and returns how far down the column it is found. That is, it returns the row number where the B5 number is found.

2. MATCH(B5,'Order Creation'!C:C,0)+4
This adds 4 to the previous result. So if the B5 value is found in cell C6 (that is row 6), this part of the formula will return 10

3. =INDEX('Order Creation'!G:G,MATCH(B5,'Order Creation'!C:C,0)+4)
This returns the value from column G of the 'Order Creation' sheet in the row obtained in the last step. For the example given, this was the number 10 so the formula returns the value from G10 - as your example requested.
 
Last edited:
Upvote 0

Aladin Akyurek

MrExcel MVP
Joined
Feb 14, 2002
Messages
85,210
I have put this in but it is telling me there is an error in the "Not Found")

A paren too many...
Code:
=IF(ISNUMBER(MATCH(B5,'Order Creation'!$C$6:$C$4004,0)),
    INDEX('Order Creation'!$H$6:$H$4004,
      MATCH(B5,'Order Creation'!$C$6:$C$4004,0)+5),
    "Not Found")
 
Upvote 0

Forum statistics

Threads
1,190,911
Messages
5,983,526
Members
439,848
Latest member
timmyo

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top