Convert numerics to alpabetics?
On Wed, 23 Feb 2005 13:59:16 -0800, peter wrote:
I need to fill 19 adjacent cells with the letters B to S
and want to do it programmatically.
I suspect I need a function to generate a String from a Byte.
Well, here's one way to do it via VBA:
==================
Sub foo()
Const FirstCol As Long = 3 'Start in Column C
Const Rw As Long = 2 ' Row 2
Dim i As Long, j As Long
j = 66 'Code for B
For i = FirstCol To FirstCol + 17
Cells(Rw, i) = Chr(j)
j = j + 1
Next i
End Sub
=====================
--ron
|