Dynamic Column reference

daniel95

New Member
Joined
Jul 13, 2016
Messages
14
Hey everyone,

I'm trying to write a formula where I can dynamically give a column reference based on the selection criteria.

For example, if the column selected is Alpha, the cell reference should be "C2" in the data set sheet

If the column selected is Beta, the cell reference should be "D2" in the data set sheet

Output (Sheet 1) -
1607619627899.png


Data set (Sheet 2)-
1607619657341.png
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
=CELL("address",INDEX(A2:O2,1,MATCH(D11,A2:O2,0)))

Something along those lines should do it. A2:O2 is your header row - D11 is your criteria.
 
Upvote 0
How about
Excel Formula:
=INDEX(Sheet2!C2:E2,MATCH(C1,Sheet2!C1:E1,0))
 
Upvote 0
Solution
Glad we could help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,213,536
Messages
6,114,215
Members
448,554
Latest member
Gleisner2

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