Using Offset with Match dynamically

jewkes6000

Board Regular
Joined
Mar 25, 2020
Messages
55
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
 

Some videos you may like

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
Joined
Jun 12, 2014
Messages
55,412
Office Version
  1. 365
Platform
  1. Windows
How about, in I24 filled down
Excel Formula:
=IFERROR(LOOKUP("T0 Head",E$24:E24,S$24:S24),"")
 

TheMohitDembla

New Member
Joined
Oct 30, 2017
Messages
8
Can you upload the file at google drive and share the link ? it would be easier to find the solution.
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
55,412
Office Version
  1. 365
Platform
  1. Windows
@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.
 

jewkes6000

Board Regular
Joined
Mar 25, 2020
Messages
55
Office Version
  1. 365
Platform
  1. Windows
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:
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
55,412
Office Version
  1. 365
Platform
  1. Windows

ADVERTISEMENT

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

jewkes6000

Board Regular
Joined
Mar 25, 2020
Messages
55
Office Version
  1. 365
Platform
  1. Windows
@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
Joined
Jun 12, 2014
Messages
55,412
Office Version
  1. 365
Platform
  1. Windows
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.
 

jewkes6000

Board Regular
Joined
Mar 25, 2020
Messages
55
Office Version
  1. 365
Platform
  1. Windows
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!!!
 

Watch MrExcel Video

Forum statistics

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