Return column letter reference instead of number


In case you want to have a variable column in your formula, e.g. you need either the sum of A:A or B:B, depending of a variable you have selected.

The COLUMN() function doesn’t work for you, because you need the A:A reference for a sum.
You can make a table to convert and use a lookup, but this is not very neat, so try it like this:

 

=SUBSTITUTE(ADDRESS(1;12;4);"1";"")&":"&SUBSTITUTE(ADDRESS(1;12;4);"1";"")

 
This will return the result for column 12 (so L:L), so make the 12 in the formula a variable, wrap it in an INDIRECT and you are good to go!

 

For example:

=SUM(INDIRECT(SUBSTITUTE(ADDRESS(1;12;4);"1";"")&":"&SUBSTITUTE(ADDRESS(1;12;4);"1";"")))

 

This will sum the content of column L:L.

 

[Source]