Sweet!
or maybe slightly faster
to excelColumnToLetters(column)
set letters to {}
repeat while column > 0
set remainder to column mod 26
if remainder = 0 then set remainder to 26
set beginning of letters to (remainder + 64)
set column to (column - remainder) div 26
end repeat
return string id letters
end excelColumnToLetters
I’m away from my Mac at the moment, but it seems that it would be easier to use GetAddress range
Columns(i) ColumnAbsolute False and then split at the colon.
I’ll post a properly syntaxed script in a bit.
my ExcelColumn(100) -- CV
on ExcelColumn(num)
tell application "Microsoft Excel"
set ans to get address column num without column absolute
end tell
set AppleScript's text item delimiters to {":"}
return text item 1 of ans
end ExcelColumn
Wow. McUsr, StefanK, mikerickson,
You guys rock. So many sensei!!