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 12 September 2010 Status Contributor Last seen 27 December 2022 - 25 Feb 2021 à 12:05
TrowaD Posts 2921 Registration date Sunday 12 September 2010 Status Contributor Last seen 27 December 2022 - 25 Feb 2021 à 12:05
Related:
- Macro that copy/pastes rows based on a certain condition on SAME sheet.
- How to copy data from one excel sheet to another - Guide
- Little alchemy cheat sheet - Guide
- How to copy paste youtube link on android - Guide
- Excel conditional formatting based on date - Guide
- How to change account based in instagram - Instagram Forum
1 response
TrowaD
Posts
2921
Registration date
Sunday 12 September 2010
Status
Contributor
Last seen
27 December 2022
555
25 Feb 2021 à 12:05
25 Feb 2021 à 12:05
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