Row Numbering dependant on amount in a cell
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! |
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! |
All times are GMT +1. The time now is 09:00 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com