View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Mike Mike is offline
external usenet poster
 
Posts: 3,101
Default Row Numbering dependant on amount in a cell


Sub numberRows()
Const cellValue As String = "E1"
r = 10
If IsNumeric(Worksheets("Sheet1").Range(cellValue).Va lue) Then
For i = 1 To Worksheets("Sheet1").Range(cellValue).Value
Worksheets("Sheet2").Range("A" & r).Value = i
r = r + 1
Next
End If
End Sub
"Monkey" wrote:

Hi there,

I am creating a Spreadsheet that calculates sample sizes depending on a
number of criteria. Once the size has been established in a cell I want that
number of rows to be numbered on another sheet starting at row 10. Does
anyone know if I am able to achive this?

Many thanks for your time!