LordDragon
10-04-2015, 07:49 AM
I seem to be missing something in my code.
I'm getting no errors, but it isn't working.
It is supposed to copy each cells data from one sheet and paste it in another.
Here is a snippet of the code:
For Each Cell In Range("A2:BP2")
Range(Cells(Cell.Row, "A"), Cells(Cell.Row, "A")).Copy
Sheets("Rig Survey Form").Range("D4").PasteSpecial xlPasteValues
Range(Cells(Cell.Row, "B"), Cells(Cell.Row, "B")).Copy
Sheets("Rig Survey Form").Range("N4").PasteSpecial xlPasteValues
Range(Cells(Cell.Row, "C"), Cells(Cell.Row, "C")).Copy
Sheets("Rig Survey Form").Range("C6").PasteSpecial xlPasteValues
Range(Cells(Cell.Row, "D"), Cells(Cell.Row, "A")).Copy
Sheets("Rig Survey Form").Range("M6").PasteSpecial xlPasteValues
Range(Cells(Cell.Row, "BO"), Cells(Cell.Row, "A")).Copy
Sheets("Rig Survey Form").Range("J66").PasteSpecial xlPasteValues
Range(Cells(Cell.Row, "BP"), Cells(Cell.Row, "B")).Copy
Sheets("Rig Survey Form").Range("A68").PasteSpecial xlPasteValues
Next Cell
End With
I'm not good with loops, but I'm not against using them. I just don't see what I'm doing wrong.
I'm getting no errors, but it isn't working.
It is supposed to copy each cells data from one sheet and paste it in another.
Here is a snippet of the code:
For Each Cell In Range("A2:BP2")
Range(Cells(Cell.Row, "A"), Cells(Cell.Row, "A")).Copy
Sheets("Rig Survey Form").Range("D4").PasteSpecial xlPasteValues
Range(Cells(Cell.Row, "B"), Cells(Cell.Row, "B")).Copy
Sheets("Rig Survey Form").Range("N4").PasteSpecial xlPasteValues
Range(Cells(Cell.Row, "C"), Cells(Cell.Row, "C")).Copy
Sheets("Rig Survey Form").Range("C6").PasteSpecial xlPasteValues
Range(Cells(Cell.Row, "D"), Cells(Cell.Row, "A")).Copy
Sheets("Rig Survey Form").Range("M6").PasteSpecial xlPasteValues
Range(Cells(Cell.Row, "BO"), Cells(Cell.Row, "A")).Copy
Sheets("Rig Survey Form").Range("J66").PasteSpecial xlPasteValues
Range(Cells(Cell.Row, "BP"), Cells(Cell.Row, "B")).Copy
Sheets("Rig Survey Form").Range("A68").PasteSpecial xlPasteValues
Next Cell
End With
I'm not good with loops, but I'm not against using them. I just don't see what I'm doing wrong.