The Column function returns a number corresponding to the letter header of the column. Is there a function to provide the opposite function, that is, given a number, it returns a letter that can then be used in a formula as a cell address?
The Column function returns a number corresponding to the letter header of the column. Is there a function to provide the opposite function, that is, given a number, it returns a letter that can then be used in a formula as a cell address?
I would use CODE and CHAR
=CODE("A")
=CHAR(65)
or starting from column A.
=CHAR(COLUMN(A1)+64) can be dragged to the right
Looking for great solutions but hate waiting?
Seach this Forum through Google
www.Google.com (e.g. +multiple +IF site:excelforum.com/excel-general/ )
www.Google.com (e.g. +fill +combobox site:excelforum.com/excel-programming/ )
Ave,
Ricardo
or use indirect with address
=INDIRECT(ADDRESS(1,1)) which =a1
=INDIRECT(ADDRESS(2,6)) which =f2
"Unless otherwise stated all my comments are directed at OP"
Mojito connoisseur and now happily retired
where does code go ?
look here
how to insert code
how to enter array formula
why use -- in sumproduct
recommended reading
wiki Mojito
how to say no convincingly
most important thing you need
Martin Wilson: SPV
and RSMBC
CHAR has obvious limitations - a safer method is ADDRESS as outlined already, the below
=SUBSTITUTE(ADDRESS(1,A1,4),"1","")
would return the column letter where column number is specified in A1
However I would make the point that RARELY do you need the letter to create range references given you can use INDEX which will utilise the number.
Consider:
A1: 10
Both
=INDIRECT(SUBSTITUTE(ADDRESS(1,A1,4),"1","")&"5")
and
=INDEX($5:$5,A1)
will return contents of J5 only the latter is non volatile and is far simpler.
My Recommended Reading:
Volatility
Sumproduct & Arrays
Pivot Intro
Email from XL - VBA & Outlook VBA
Function Dictionary & Function Translations
Dynamic Named Ranges
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks