Hi,
I am very inexperienced on Excel and am currently trying to create a way in which i can check using a macro or some VBA code to see what cells have been chosen and once they are chosen they need to be pasted to another sheet. The problem I am having is that once more than 1 cell has been chosen i can't seem to work out how to paste multiple lines. The other problem i am having is that at the same time i need to be checking if something has already been pasted to the line on the other sheet and if so it needs to go down to the next row. I have found a way but there must be an easier way. The way this is looking i am going to end up with 1000's of lines of code and am just wondering if anyone has a tidier, more efficient way of doing this. I have included the code i have so far.
Sub Compiler()
Sheets("Red X Customer List").Select
If Range("N4").Value = True Then
Range("A4:L4").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Weekly Sheet").Select
Range("A5").Select
If Range("A5").Value = 0 Then
ActiveSheet.Paste
Sheets("Red X Customer List").Select
ElseIf Range("A6").Value = 0 Then
Range("A6").Select
ActiveSheet.Paste
Sheets("Red X Customer List").Select
ElseIf Range("A7").Value = 0 Then
Range("A7").Select
ActiveSheet.Paste
Sheets("Red X Customer List").Select
If Range("N5").Value = True Then
Range("A5:L5").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Weekly Sheet").Select
Range("A5").Select
If Range("A5").Value = 0 Then
ActiveSheet.Paste
Sheets("Red X Customer List").Select
ElseIf Range("A6").Value = 0 Then
Range("A6").Select
ActiveSheet.Paste
Sheets("Red X Customer List").Select
ElseIf Range("A7").Value = 0 Then
Range("A7").Select
ActiveSheet.Paste
Sheets("Red X Customer List").Select
End If
End If
End If
End If
End Sub
Please excuse the various mistakes i have more than likely unintentionally made.
Many Thanks,
Gareth
Bookmarks