Formula to return just the Column Letter in excel [duplicate]

I am looking for a formula I can use in any cell that will return the column LETTER of the column the formula is in,

I can get the LETTER and ROW number using the below, but I cant get it without the ROW information

=ADDRESS(CELL("row"),CELL("col"))

I don't mind using vba to work it out if there isn't a formula that can achieve this.

NOT A DUPLICATE OF How to get the current column name in Excel? I only want the COLUMN and not the line number !


Solution 1:

FYI on your original formula you don't actually need to call the CELL formula to get row and column you can use:

=ADDRESS(ROW(),COLUMN())

Then as an extension of that you can use MID & SEARCH to find the $ and trim down the output so you are just left with the letter:

=MID(ADDRESS(ROW(),COLUMN()),SEARCH("$",ADDRESS(ROW(),COLUMN()))+1,SEARCH("$",ADDRESS(ROW(),COLUMN()),SEARCH("$",ADDRESS(ROW(),COLUMN()))+1)-2)

edit You can even simplify this further:

=MID(ADDRESS(ROW(),COLUMN()),2,SEARCH("$",ADDRESS(ROW(),COLUMN()),2)-2)

As per comment from @engineertoast below