Auto copy data from sheet1 to sheet based on criteria

Solved/Closed
whatchatalkingaboutWillis - Updated on May 18, 2021 at 11:58 AM
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 - Apr 20, 2021 at 12:00 PM
Hello,

I am trying to auto copy values from Sheet1, Col A to Sheet 2 only if criteria from Sheet1, Col b is met. I have tried so many different types of code both in VBA and an IF statement and I cant get it to work. Any help is much appreciated.

System Configuration: Windows / Chrome 89.0.4389.90

1 response

TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 552
Apr 20, 2021 at 12:00 PM
Hi Willis,

You mean like this?:
Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Columns("A")) Is Nothing Then Exit Sub
If Target.Cells.Count > 1 Then Exit Sub

If Target.Offset(0, 1).Value = "Criteria" Then
    Sheets("Sheet2").Range("A" & Rows.Count).End(xlUp).Offset(1, 0).Value = Target.Value
End If
End Sub


Best regards,
Trowa
0