Thread: Next Row
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
hazel hazel is offline
external usenet poster
 
Posts: 114
Default Next Row

Hi Trevor

Thanks for the reply but actually I've tried that and all it does is select
the row at the end of the range e.g row 200 using your reply -- what I want
to do is click the button whilst its showing the data on "LIST2" from row 2
on "LIST1" and on clicking it moves to row 3 "List1" and replaces the data
that is showing in "List2" I can then print that sheet off. Does all that
make sense???
--
Many thanks

hazel


"Trevor Shuttleworth" wrote:

Hazel

do you mean something like:

For Each myCell In Worksheets("LIST1").Range("A2:A200")

Your current statement only processes one cell, A2. The above construct
would process all the cells from A2 to A200

Regards

Trevor


"Hazel" wrote in message
...
Hi Everbody
A little help needed with the following I have the following macro on
sheet
"List2" how would I add another macro that would pick the next row on
sheet
"List1" I would prefer to add a button on "List2" and by just clicking on
it
it will go to the next row.

Sub Macro1()
Dim myCell As Range


For Each myCell In Worksheets("LIST1").Range("A2:A2")
If myCell.Value < "" Then


Worksheets("LIST2").Range("C6").Value = myCell(1, 2).Value
Worksheets("LIST2").Range("C7").Value = myCell(1, 3).Value
Worksheets("LIST2").Range("C8").Value = myCell(1, 4).Value
Worksheets("LIST2").Range("C9").Value = myCell(1, 5).Value
Worksheets("LIST2").Range("C10").Value = myCell(1, 6).Value
Worksheets("LIST2").Range("F8").Value = myCell(1, 7).Value
Worksheets("LIST2").Range("C11").Value = myCell(1, 8).Value
Worksheets("LIST2").Range("F9").Value = myCell(1, 9).Value
Worksheets("LIST2").Range("F10").Value = myCell(1, 10).Value
Worksheets("LIST2").Range("F11").Value = myCell(1, 11).Value
Worksheets("LIST2").Range("F12").Value = myCell(1, 12).Value
Worksheets("LIST2").Range("F13").Value = myCell(1, 13).Value
Worksheets("LIST2").Range("F14").Value = myCell(1, 14).Value
Worksheets("LIST2").Range("C4").Value = myCell(1, 15).Value
Worksheets("LIST2").Range("E3").Value = myCell(1, 16).Value

End If
Next myCell

End Sub


--
Many thanks

hazel