Cell Letter

lazzarox

New Member
Joined
Jul 15, 2008
Messages
33
Hi Everybody!

Is there a formula that returns the column letter of a cell?

For example: for the cell C3, returns C

Thks
 

Some videos you may like

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney

RoryA

MrExcel MVP, Moderator
Joined
May 2, 2008
Messages
36,067
Office Version
  1. 365
  2. 2019
  3. 2016
  4. 2010
Platform
  1. Windows
  2. MacOS
You can use a UDF like:
Code:
Public Function GetColAlpha(lngCol As Long) As String
   ' Gets column letter(s) given a number
    GetColAlpha = Replace$(Replace$(Application.ConvertFormula("R1C" & lngCol, xlR1C1, xlA1, False), "$", ""), "1", "")
End Function
just pass it the column number you want and it will work as long as it's a valid column number (i.e. <=256 for Excel 2003 and below).
 

lazzarox

New Member
Joined
Jul 15, 2008
Messages
33

ADVERTISEMENT

Hi!
thanks.

is it not possible to write in the cell C3 itself a formula to return the letter corrisponding to the column (C)?

For the row I can write row(), but for column it returns a number and not the letter ....

Thanks
 

DonkeyOte

MrExcel MVP
Joined
Sep 6, 2002
Messages
9,123
Worth noting the below will only work for the first 26 columns (to Z) thereafter you should use the address property as outlined by Andrew

=CHAR(COLUMN(C3)+64)

Can we ask why you need the letter ?
(Often it is better to reference columns using their integer values as opposed to their letter).
 

lazzarox

New Member
Joined
Jul 15, 2008
Messages
33
i am writing some formula that specify a range
for now I use column and a vlookup in a "Note Sheet" ... but there should be something easier ...
 

lazzarox

New Member
Joined
Jul 15, 2008
Messages
33
Considering to write in J9, I modified the formula in

=SUBSTITUTE(SUBSTITUTE(CELL("address",J9),"$",""),ROW(),"")

It worked and it is not simple but I can copy, paste and transpose with no problems.

Thanks to you all
 

Watch MrExcel Video

Forum statistics

Threads
1,122,564
Messages
5,596,875
Members
414,106
Latest member
Tigretto

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