A VBA Code to Transfer rows of cells across Sheets based on Certain Column Value

jesuisazep

New Member
Joined
Nov 13, 2024
Messages
2
Office Version
  1. 365
  2. 2021
Platform
  1. Windows
Hello So I have two identical sheets that relate to eachother based on correspondance from clients etc. I want a VBA code that will copy the Entire row from sheet 1 pictured below to sheet 2 based on Column N saying "Incomplete". I also would like it to update automatically based on if the status changes if that is at all possible. Any help or guidance would be appreciated, I thought I had it figured out with a sample code below but it will not update after the second user is entered it continuously overrides the same row

VBA Code:
Private Sub Worksheet_Change(ByVal Target As Range)
    If Target.CountLarge > 1 Then Exit Sub
    If Target.Column <> 14 Then Exit Sub
    If Target = "Incomplete, Moved to Site Inspection Sheet" Then
        With Sheets("LF WDIF SI")
            Target.EntireRow.Copy .Cells(.Rows.Count, "A").End(xlUp).Offset(7)
        End With
    End If
    Application.ScreenUpdating = False
End Sub


1731511310314.png
 
Last edited by a moderator:

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
Hi,
I'm not sure if this is what You want .
just try
VBA Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.CountLarge > 1 Then Exit Sub
If Target.Column = 14 Then
 Application.EnableEvents = False
If Target.Value = "Incomplete" Then
With Sheets("LF WDIF SI")
Target.EntireRow.Copy .Cells(.Rows.Count, "A").End(xlUp).Offset(1)
End With
End If
End If
Application.EnableEvents = True
End Sub
 
Upvote 0
@jesuisazep
For the future, when posting vba code in the forum, please use the available code tags. It makes your code much easier to read/debug & copy. My signature block below has more details. I have added the tags for you this time. 😊
 
Upvote 0

Forum statistics

Threads
1,223,883
Messages
6,175,167
Members
452,615
Latest member
bogeys2birdies

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