I need help.
I am trying to utilize a macro that will be able to take the data from one worksheet and paste selected cells into another that is formatted. The problem for me comes from not knowing enough about macros to put the proper code in that will help me be able to put different amounts of rows of data into my first worksheet and have the macro stop after it hits a cell with no data in it.
I recorded the macro as I want to see it and have tested it. I only utilized two rows worth of data to show you, but my hope is to be able to automate it so it knows when there is no more data to move. Any ideas? You have all been very helpful in the past and make me look like a star. Your assistance would be greatly appreciated.
Here is my code.
Sheets("Lead Worksheet").Select
Rows("11:11").Select
Selection.Insert Shift:=xlDown
Range("B12").Select
Sheets("Paste in this sheet").Select
Range("L4").Select
Selection.Copy
Sheets("Lead Worksheet").Select
ActiveSheet.Paste
Sheets("Paste in this sheet").Select
Range("Q4").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Lead Worksheet").Select
Range("C12").Select
ActiveSheet.Paste
Sheets("Paste in this sheet").Select
ActiveWindow.LargeScroll ToRight:=-1
Range("H4").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Lead Worksheet").Select
Range("E12").Select
ActiveSheet.Paste
Sheets("Paste in this sheet").Select
Range("N4:O4").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Lead Worksheet").Select
Range("F12").Select
ActiveSheet.Paste
Sheets("Paste in this sheet").Select
ActiveWindow.LargeScroll ToRight:=1
Range("U4").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Lead Worksheet").Select
ActiveWindow.LargeScroll ToRight:=1
Range("I12").Select
ActiveSheet.Paste
ActiveWindow.LargeScroll ToRight:=-1
Rows("11:11").Select
Application.CutCopyMode = False
Selection.Insert Shift:=xlDown
Range("B12").Select
Sheets("Paste in this sheet").Select
ActiveWindow.LargeScroll ToRight:=-1
Range("L5").Select
Selection.Copy
Sheets("Lead Worksheet").Select
ActiveSheet.Paste
Sheets("Paste in this sheet").Select
Range("Q5").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Lead Worksheet").Select
Range("C12").Select
ActiveSheet.Paste
Sheets("Paste in this sheet").Select
ActiveWindow.LargeScroll ToRight:=-1
Range("H5").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Lead Worksheet").Select
Range("E12").Select
ActiveSheet.Paste
Sheets("Paste in this sheet").Select
Range("N5:O5").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Lead Worksheet").Select
Range("F12").Select
ActiveSheet.Paste
Sheets("Paste in this sheet").Select
ActiveWindow.LargeScroll ToRight:=1
Range("U5").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Lead Worksheet").Select
ActiveWindow.LargeScroll ToRight:=1
Range("I12").Select
ActiveSheet.Paste
End Sub
Bookmarks