Marco's to cut row into new row based on cell value. Updating specific columns whilst doing this

TMG738

New Member
Joined
Jun 19, 2020
Messages
6
Office Version
  1. 365
Platform
  1. Windows
I currently have a code which cuts and move a row based on a cell value to another sheet. Which is:
Private Sub Worksheet_Change(ByVal Target As Range)

Dim raDest As Range
Dim raCell As Range

If Not Intersect(Target, Range("Y:Y")) Is Nothing Then
If Target.Cells.Count > 1 Or IsEmpty(Target) Then
Exit Sub
Else
If Target.Value = "Yes" Then

Application.ScreenUpdating = False
With ThisWorkbook.Sheets("Accounts 2021")
Set raDest = .Cells(.Rows.Count, "Y").End(xlUp).Offset(1, 0).EntireRow
End With
Me.Rows(Target.Row).Copy Destination:=raDest
Set raCell = raDest.Cells(1, "J")
If IsDate(raCell.Value) Then
raCell.Value = DateAdd("yyyy", 1, raCell.Value)
End If
Set raCell = raDest.Cells(1, "K")
If IsDate(raCell.Value) Then
raCell.Value = DateAdd("yyyy", 1, raCell.Value)
End If
raDest.Columns("M:U").ClearContents

Application.EnableEvents = False
Me.Rows(Target.Row).Delete
Application.EnableEvents = True

End If
Application.ScreenUpdating = True
End If
End If
End Sub

But I'm now trying to do the same thing, but not moving the cut row to another sheet, but instead having this cut row move to the bottom of the sheet.

Can this be done?

Thanks
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.

Forum statistics

Threads
1,214,641
Messages
6,120,693
Members
448,979
Latest member
DET4492

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top