Hi,
Please see spreadsheet attached. I need help fixing this macro. It needs to copy items on the tab in green, on the first tab called report. Can someone help me fix this macro?
Thank you in advance
Cele
Hi,
Please see spreadsheet attached. I need help fixing this macro. It needs to copy items on the tab in green, on the first tab called report. Can someone help me fix this macro?
Thank you in advance
Cele
Try:Sub AddToReport() Application.ScreenUpdating = False Dim x As Long Dim y As Long Dim z As Long Dim LastRow As Long For x = 5 To 81 Step 8 LastRow = Sheets("Report").Cells.Find("*", SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row Range("BB1") = LastRow Sheets("Report").Cells(LastRow + 1, "A") = Sheets("Order Details").Range("E" & x) 'Month Sheets("Report").Cells(LastRow + 1, "B") = Sheets("Order Details").Range("F" & x) 'Date Sheets("Report").Cells(LastRow + 1, "C") = Sheets("Order Details").Range("D" & x) 'Requestor Sheets("Report").Cells(LastRow + 1, "D") = Sheets("Order Details").Range("C" & x) 'Category Sheets("Report").Cells(LastRow + 1, "E") = Sheets("Order Details").Range("B" & x) 'Task Next x For y = 7 To 81 Step 8 Sheets("Report").Cells(Range("BB1") + 1, "G").End(xlUp).Offset(1, 0) = Sheets("Order Details").Range("D" & y) 'Time Sheets("Report").Cells(Range("BB1") + 1, "F").End(xlUp).Offset(1, 0) = Sheets("Order Details").Range("B" & y) 'Description Next y For z = 8 To 81 Step 8 Sheets("Report").Cells(Range("BB1") + 1, "I").End(xlUp).Offset(1, 0) = Sheets("Order Details").Range("B" & z) 'Comments Next z Range("BB1").ClearContents Application.ScreenUpdating = True End Sub
You can say "THANK YOU" for help received by clicking the Star symbol at the bottom left of the helper's post.
Practice makes perfect. I'm very far from perfect so I'm still practising.
Almost there!
The only thing that needs to be fixed is the Comments column. It needs to type on the first tab, whats actually on the Comments section.
Example for task one, it should copy the the first tab More apples
For the second it should be Get tracking numbers
For the third Bananas send them tomorrow.
You see what i mean?
Oops! Change this line:to this lineFor z = 8 To 81 Step 8
For z = 9 To 81 Step 8
It worked. You totally rock!!!
Everyone, please note that Mumps1 helped me with this macro. And it totally works!!
A billion thanks to Mumps1 !!!!!!!!!
It was my pleasure.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks