Macro that copy/pastes rows based on a certain condition on SAME sheet.
Solved/Closed
jaime.mmm
-
Updated on Feb 24, 2021 at 02:09 AM
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 - Feb 25, 2021 at 12:05 PM
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 - Feb 25, 2021 at 12:05 PM
Related:
- Macro that copy/pastes rows based on a certain condition on SAME sheet.
- Excel macro to create new sheet based on value in cells - Guide
- Windows network commands cheat sheet - Guide
- Google sheet right to left - Guide
- Mark sheet in excel - Guide
- Little alchemy cheat sheet - Guide
1 response
TrowaD
Posts
2921
Registration date
Sunday September 12, 2010
Status
Moderator
Last seen
December 27, 2022
555
Feb 25, 2021 at 12:05 PM
Feb 25, 2021 at 12:05 PM
Hi Jaime,
You didn't provide much details.
The 6 columns you mention are columns A to F in the code below. When the 6th column (F) is empty, then that row (columns A to E) are copied to column H at the first available row (occupying columns H to L).
Here is the code:
Let us know if further assistance is desired.
Best regards,
Trowa
You didn't provide much details.
The 6 columns you mention are columns A to F in the code below. When the 6th column (F) is empty, then that row (columns A to E) are copied to column H at the first available row (occupying columns H to L).
Here is the code:
Sub RunMe() For Each cell In Range("A2:A" & Range("A" & Rows.Count).End(xlUp).Row) If cell.Offset(0, 5).Value = vbNullString Then Range(Cells(cell.Row, "A"), Cells(cell.Row, "E")).Copy Range("H" & Rows.Count).End(xlUp).Offset(1, 0) End If Next cell End Sub
Let us know if further assistance is desired.
Best regards,
Trowa