Making the column letters dynamic inside a formula

Daksh Agarwal

New Member
Joined
Feb 22, 2023
Messages
1
Office Version
  1. 365
Platform
  1. Windows
Thanks in advance. I have this formula mentioned below. I want to make the column reference "DO" dynamic. I have a data set where I want it to pick the column number from (In this data set one column has Numbers & the other has column reference). I want to make this column reference to change based on an a hard coded input cell where i give a particular number which it can lookup in the above mentioned data set to get the column letters.
1677100179045.png
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
Hi, welcome to the forum. There is an add in if you can install, xl2bb (link below) you can share parts of your workbook that can help the forum users help you.
I'm not sure if youre asking to use an INDIRECT reference inside the OFFSET function. But, what you could do to calculate a the distance from that target cell and the current cell is to subtract the Col numbers of that cell and the row numbers of that cell to get offsets.
So, say your location of data cell is C5, and you are building the formula in D10.

Excel Formula:
=OFFSET(D10,ROW($C$5)-ROW(D10),COLUMN(C5)-COLUMN(D10))


I have no idea if this helps your solution or not:

Mr Excel 8.xlsm
BCDE
3
4
5Hello
6
7
8
9
10Hello
11
Sheet14
Cell Formulas
RangeFormula
D10D10=OFFSET(D10,ROW($C$5)-ROW(D10),COLUMN(C5)-COLUMN(D10))
 
Upvote 0

Forum statistics

Threads
1,214,641
Messages
6,120,693
Members
448,979
Latest member
DET4492

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