1 to A delete lock Revision 323537323931 (Thu Mar 28 2013 at 16:57) - Diff Link to this snippet: https://friendpaste.com/4AnRk0kR6gEaWlXn6f7GcH Embed: manni perldoc borland colorful default murphy trac fruity autumn bw emacs pastie friendly Show line numbers Wrap lines 123456789101112131415161718192021222324252627282930Function convert(i As Long) As String Dim num As Long Dim str As String str = Chr(((i - 1) Mod 26) + 65) num = (i - 1) \ 26 Do While num <> 0 str = Chr(((num - 1) Mod 26) + 65) & str num = (num - 1) \ 26 Loop convert = str End FunctionSub Macro1() Dim i As Long For i = 1 To 5000 Cells(i, 1) = i Cells(i, 2) = convert(i) Next End Sub