Easy one..?

  • Thread starter Thread starter Gromit
  • Start date Start date
G

Gromit

Hi
Anyone know the slickest way of returning the letter of the column I'm
in off the top of their heads?

Cheers

G
 
One way is to put this in a regular module and use

Function GetColLet(ColNumber As Integer) As String
GetColLet = Left(Cells(1, ColNumber).Address(False, False), _
1 - (ColNumber > 26))
End Function
another
Sub colltr()
MsgBox Left(ActiveCell.Address(, 0), InStr(ActiveCell.Address(, 0), "$") -
1)
End Sub

or a formula
=LEFT(ADDRESS(1,A1,2),1+(A1>26))
 
Hi
Anyone know the slickest way of returning the letter of the column I'm
in off the top of their heads?

Cheers

G


=CHAR(COLUMN()+64)

--ron
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top