Quick Q. Return letter of column

spacebouncer

Board Regular
Joined
Feb 7, 2014
Messages
109
Hi, is there an easy way to return the letter of a column, rather than its number? Thanks
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.

bbott

Well-known Member
Joined
Feb 5, 2010
Messages
2,350
Something like this:

=CHAR(COLUMN(A1)+64)

will return "A" for cell A1. Just sub in a cell from the desired column.
 
Upvote 0

johnmpl

Board Regular
Joined
Jun 14, 2013
Messages
235
Office Version
  1. 365
Platform
  1. Windows
Hi!

Try This formula:

=SUBSTITUTE(ADDRESS(ROW(),COLUMN(),4),ROW(),"")

Or

=SUBSTITUTE(ADDRESS(ROW(A1),COLUMN(A1),4),ROW(A1),"")

This formula works in all the columns in Excel.

The another formula post for bbott

=CHAR(COLUMN(A1)+64)

Only works until column Z.

Blessings!
 
Upvote 0

spacebouncer

Board Regular
Joined
Feb 7, 2014
Messages
109
Thanks guys.

I went for this in the end:

Code:
Function columnletter(colnumber As Integer) As String

If colnumber <= 26 Then
    columnletter = Chr(((colnumber + 1) Mod 26) + 63)
End If

If colnumber > 26 And colnumber <= 26 * 26 Then
    columnletter = Chr((Int(colnumber / 26) + 64))
    columnletter = columnletter & Chr(((colnumber + 1) Mod 26) + 63)
End If

End Function

Works for the first 676, that'll do for me! Thanks John, thats gonna be a lot less like reinventing the wheel. Cheers both
 
Upvote 0

NewOrderFac33

Well-known Member
Joined
Sep 26, 2011
Messages
1,268
Office Version
  1. 2016
  2. 2010
Platform
  1. Windows
How about this - it's a bit shorter?
Code:
Function GCL(MyRange As Range) As String
   GCL = Split(MyRange.Address, "$")(1)
End Function
 
Upvote 0

Forum statistics

Threads
1,191,166
Messages
5,985,051
Members
439,935
Latest member
Monty238

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