Does anyone have an Excel VBA function which can return the column letter(s) from a number?
For example, entering 100 should return CV.
CV
Here, a simple function in Pascal (Delphi).
function GetColLetterFromNum(Sheet : Variant; Col : Integer) : String; begin Result := Sheet.Columns[Col].Address; // from Col=100 --> '$CV:$CV' Result := Copy(Result, 2, Pos(':', Result) - 2); end;