# Using Offset with Match dynamically

#### jewkes6000

##### Board Regular
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.

### Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.

#### Fluff

##### MrExcel MVP, Moderator
How about, in I24 filled down
Excel Formula:
``=IFERROR(LOOKUP("T0 Head",E\$24:E24,S\$24:S24),"")``

#### TheMohitDembla

##### New Member
Can you upload the file at google drive and share the link ? it would be easier to find the solution.

#### Fluff

##### MrExcel MVP, Moderator
@TheMohitDembla
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.

#### TheMohitDembla

##### New Member

@Fluff Okay, I will keep that in mind. Thanks

#### jewkes6000

##### Board Regular
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.

#### Fluff

##### MrExcel MVP, Moderator

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.

#### jewkes6000

##### Board Regular
@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.

#### Fluff

##### MrExcel MVP, Moderator
You are indeed using 365, it's the only version with Xlookup.

#### jewkes6000

##### Board Regular
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!!!

Replies
2
Views
103
Replies
15
Views
374
Replies
3
Views
70
Replies
5
Views
165
Replies
2
Views
165

1,127,334
Messages
5,624,088
Members
416,010
Latest member
NJT

### 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.

### Which adblocker are you using?

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

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