Lookup Formula for Two Letter Column Name

legalhustler

Well-known Member
Joined
Jun 5, 2014
Messages
1,171
Office Version
  1. 365
Platform
  1. Windows
In cell E119 I have the lookup value: $AU$25

I would like to return the value/header name from column AU25 back.

My initial formula below works fine for columns A-Z, but not for columns with two letters (i.e. AU). Can someone help modify this for me or suggest a new way?

=IF(G4="","",INDEX(Sheet1!$D$4:$CX$4,1,CODE(MID(AU25,FIND("$",AU25)+1,FIND("$",AU25,FIND("$",AU25)+1)-(FIND("$",AU25)+1)))-64-3))
 
Last edited:

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
How about something along the lines of =INDEX(1:1,1,COLUMN(INDIRECT($AU$25))) assuming that your headers are in row 1.
 
Upvote 0
Try this:

=IF(G4="","",INDEX(Sheet1!$D$4:$CX$4,1,COLUMN(INDIRECT(AU25))-3))

Can we avoid using INDIRECT since I have a large spreadsheet and don't want to use a volatile function to slow down my calcs. BTW, I need to extract AU25 from $AU$25...I don't want to hardcode it.
 
Last edited:
Upvote 0
Just curious but why doesn't E119 appear in the formula?
 
Upvote 0
My original (corrected) formula is this:

=IF(G4="","",INDEX(Sheet2!$D$4:$CX$4,1,CODE(MID(E119,FIND("$",E119)+1,FIND("$",E119,FIND("$",E119)+1)-(FIND("$",E119)+1)))-64-3))

In Sheet1, cell E119 contains the lookup value: $AU$25

However, I want to return the value from Sheet2 cell AU25 based on the lookup value from cell E119.

Note: My Mid formula is returning "AU" from cell E119.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,918
Messages
6,122,243
Members
449,075
Latest member
staticfluids

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