View Single Post
  #3   Report Post  
Trevor Shuttleworth
 
Posts: n/a
Default

Derek

one way:

Dim aParameters
Dim sName As String
Dim iStartRow As Integer
Dim iEndRow As Integer
Dim c As Range

'If LCase(ActiveSheet.Name) < "sheet2" Then Exit Sub ' or
If LCase(ActiveSheet.Name) < "sheet2" Then Sheets("Sheet2").Select
With Sheets("Sheet2")
For Each c In .Range(Range("A1"), .Range("A1").End(xlDown))
aParameters = Split(c.Value, ",")
sName = aParameters(0)
iStartRow = aParameters(1)
iEndRow = aParameters(2)
With Sheets("Sheet1")
.Range(.Cells(iStartRow, 1), .Cells(iEndRow, 1)) = sName
End With
Next 'c
End With

Regards

Trevor


"Derek Y via OfficeKB.com" wrote in message
...

Hello,

In sheet2 of an excel I would to have 3 Columns. Name, Start row, End
Row.

I would for example plug in

Derek, 2, 400
Bob, 401, 700
Jane,701,1000

Where my comma's denote the next column.

I would then like Derek entered in column A row 2, 3......400 (in sheet1).
Then I want Bob to be entered in column A, row 401,402...700. You get the
point. Is this possible?

Thanks in advance,
Derek