Simple function for column number to letters

I just joined, moving to LibreCalc after many years on Excel. I wrote a short and simple function to convert column numbers to letters. Maybe useful for someone? I also wrote one to convert column letters to numbers.
(They have no error corrections and accept column numbers >16,384!)

'Return column letters from number
Function aCol(i) as String
	do while i > 0
		aCol = Chr(i - 26*int((i-0.1)/26) + 64) & aCol: i = int((i-0.1)/26)
	loop
End Function
'Return column number from letters
Function iCol(a) as Double
	do while len(a) > 0
		iCol = iCol*26 + asc(left(a,1))-64: a = right(a,len(a)-1)
	loop
End Function

Thanks but, for my purposes, I needed to use a short function to interpet indirect references without having to switch to the R1C1 format. This function duplicates what I have used in Excel.

image :innocent:

use case ?

Oops, thanks! This occured at every multiple of 26. This fixes it. Original post updated to suit.

'Return column letters from number
Function aCol(i) as String
	do while i > 0
		aCol = Chr(i - 26*int((i-0.1)/26) + 64) & aCol: i = int((i-0.1)/26)
	loop
End Function

A way without user code if addresing mode "A1" is enabled.
disask117411_also_a_way.ods (13.6 KB)