caligirl626
New Member
- Joined
- Nov 28, 2022
- Messages
- 24
- Office Version
- 365
- Platform
- Windows
Have a workbook with many sheets that logs work orders per project (each sheet is a different project). The first sheet called "Project" is the main log that tracks all the work orders.
I need a macro that copies the contents of cell columns A,B,C of a project sheet where the selection has been set to column A, and copies those A,B,C contents into to the "Project" sheet columns D,E,F of the next empty row.
For example, cell A11 is selected in project sheet "6402-01" (capture1.png). When the macro is activated, it copies A11, B11, C11 and pastes them into the "Project" sheet cells D2266, E2266, F2266 because that was the next empty row of the "Project" sheet" (capture2.png).
This code does the request, but only for certain cells. Need it a bit smarter.
I need a macro that copies the contents of cell columns A,B,C of a project sheet where the selection has been set to column A, and copies those A,B,C contents into to the "Project" sheet columns D,E,F of the next empty row.
For example, cell A11 is selected in project sheet "6402-01" (capture1.png). When the macro is activated, it copies A11, B11, C11 and pastes them into the "Project" sheet cells D2266, E2266, F2266 because that was the next empty row of the "Project" sheet" (capture2.png).
This code does the request, but only for certain cells. Need it a bit smarter.
VBA Code:
Sub Macro6()
'
' Macro6 Macro
'
'
Range("A11:C11").Select
Selection.Copy
Sheets("Project").Select
Range("D2266").Select
ActiveSheet.Paste
End Sub