Ask Your Question

Function to get the column name of a cell?

asked 2020-06-04 23:09:52 +0100

afroveo gravatar image

How to get the column name of a cell?

For example what function can I use in the cell B3 so that the return value is the column name "B"?

edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted

answered 2020-06-04 23:20:54 +0100

Opaque gravatar image

updated 2020-06-04 23:43:56 +0100


=REGEX(ADDRESS(ROW(),COLUMN(),4),"(.+)(\d+)","$1") should work

Update According to @keme's comment (thanks for that)

=REGEX(ADDRESS(ROW(),COLUMN(),4),"([:alpha:])(\d+)","$1") --or--

But anyway - solution using SUBSTITUTE() and taking into account that row isn't important at all is much simpler.

Hope that helps

edit flag offensive delete link more



The (.+) uses greedy matching, which catches digits from row 10 onwards. Add a question mark for lazy matching. =REGEX(ADDRESS(ROW(),COLUMN(),4),"(.+?)(\d+)","$1")

keme gravatar imagekeme ( 2020-06-04 23:32:41 +0100 )edit

thank you!

afroveo gravatar imageafroveo ( 2020-06-15 13:50:26 +0100 )edit

answered 2020-06-04 23:15:03 +0100

afroveo gravatar image

I found the solution


in another question:

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2020-06-04 23:09:52 +0100

Seen: 202 times

Last updated: Jun 04 '20