View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Howard Howard is offline
external usenet poster
 
Posts: 536
Default ActiveCell.Offset(i, 0) = Chr(ActiveCell.Row + 62) returns all A's

Why won't subject line increment A B C D etc. in code. Should increment the number of times as entered in InputBox but instead returns all A's below A3.

Option Explicit

Sub MakeRanger()
Dim CNum As String
Dim i As Long

CNum = InputBox(" Enter a number.", _
"a Number")

i = CNum

Range("A3").Select
For i = 1 To i - 1
ActiveCell.Offset(0, i) = i
ActiveCell.Offset(i, 0) = Chr(ActiveCell.Row + 62)
Next
End Sub

Thanks,
Howard