Using Offset with Match dynamically

jewkes6000

Board Regular
Joined
Mar 25, 2020
Messages
60
Office Version
  1. 365
Platform
  1. Windows
In the below example, I am trying to use an Offset formula in cell I33. My end goal is to get the value of S25; however, I need to copy this formula down in several cells in column I, so the reference cell will change. I tried using the offset formula to reference E33, then the match function to find "T0 Head", then go over 14 rows to S25, but it's not returning as I would like it to. One important note, when searching the array with the match function, it needs to search up (from cells E33 up to E23). The reason for this is that when I eventually copy the formula down column I, there will be other "T0 Head" cells in column E at which point it needs to reference the cell 14 columns to the right (so instead of S25, it'd be whatever row the other "T0 Head" is on).

Here is the formula I tried: =OFFSET(E33,-MATCH("T0 Head",$E$23:$E$20000,0),14). This formula actually returns cell S30, which is not what I want.

Thank you in advance. Any help is much appreciated.


1602526938184.png
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
How about, in I24 filled down
Excel Formula:
=IFERROR(LOOKUP("T0 Head",E$24:E24,S$24:S24),"")
 
Upvote 0
@TheMohitDembla
Please do not constantly ask OPs to upload files to share sites, we would prefer members use the XL2BB add-in to post data direct to the thread.
Many forum users search the forum for answers without ever posting a question. There is no guarantee that files at file-share sites will still be there when somebody else reviews the thread at a later time.
 
Upvote 0
Fluff - I'm not sure why, but your formula works on some rows, but on others it returns different values. I can't find a rhyme or reason as to why it works on some and not on others.

TheMohitDembla - You can download the file here:
 
Upvote 0
Ok, as you have the Xlookup function try
Excel Formula:
=XLOOKUP("T0 Head",E$24:E24,S$24:S24,"",0,-1)

Also please update your account details to show the version of Excel that you have, as this affects which functions you can use.
 
Upvote 0
Solution
@Fluff - Worked great! Thank you. This might sound like a dumb questions, but how do I know what version of Excel I'm using? I believe it's the 365 version which is what my account currently shows.
 
Upvote 0
You are indeed using 365, it's the only version with Xlookup.
I must have missed the fact you were already showing your Xl version, sorry about that.
 
Upvote 0
No problem. Thank you again. I've been using xlookup a lot and it's amazing! What I learned from this whole thing was that by making the first part of the range constant (E$24 & S$24), and then the other dynamic, I can easily set a range that I need. Don't know why I didn't think of it, but I guess that's why we have forums like these. Much appreciated!!!
 
Upvote 0

Forum statistics

Threads
1,213,567
Messages
6,114,342
Members
448,570
Latest member
rik81h

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
Back
Top