Excel Macro-Pasting on next available row
Closed
tomris
-
Feb 6, 2012 at 09:52 AM
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 - Feb 7, 2012 at 10:39 AM
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 - Feb 7, 2012 at 10:39 AM
Related:
- Excel Macro-Pasting on next available row
- Saints row 2 cheats - Guide
- Spell number in excel without macro - Guide
- Excel marksheet - Guide
- Excel apk for pc - Download - Spreadsheets
- Macros in excel download free - Download - Spreadsheets
1 response
TrowaD
Posts
2921
Registration date
Sunday September 12, 2010
Status
Moderator
Last seen
December 27, 2022
555
Feb 7, 2012 at 10:39 AM
Feb 7, 2012 at 10:39 AM
Hi Tomris,
I don't know if I understand you entirely, but let's start with this code. Make sure you have a back up file, so you don't loose any data when the desired result is not achieved.
Best regards,
Trowa
I don't know if I understand you entirely, but let's start with this code. Make sure you have a back up file, so you don't loose any data when the desired result is not achieved.
Sub MoveData() Dim lRow, lRow2 As Integer lRow = Sheets("Sheet2").Range("J" & Rows.Count).End(xlUp).Row For Each cell In Sheets("Sheet2").Range("J2:J" & lRow) If cell.Value = "Paid" Then lRow2 = Sheets("Sheet3").Range("J" & Rows.Count).End(xlUp).Row cell.EntireRow.Copy Destination:=Sheets("Sheet3").Range("A" & lRow2 + 1) cell.Value = "N\A" End If Next cell End Sub
Best regards,
Trowa