Excel copy data from one cell to another if a condition is met

Hi Tomas,Here you go:Private Sub Worksheet_Change(ByVal Target As Range) If Intersect(Columns("C"), Target) Is Nothing Then Exit Sub Rows(Target.Row).Copy Sheets("Sheet2").Range("C

Excel copy data from one cell to another if a condition is met

Hi Tomas,

Here you go:Private Sub Worksheet_Change(ByVal Target As Range) If Intersect(Columns("C"), Target) Is Nothing Then Exit Sub Rows(Target.Row).Copy Sheets("Sheet2").Range("C" & Rows.Count).End(xlUp).Offset(1, -2) End Sub

To implement the code:
- Hit Alt+F11 to open the VBA window
- Find Sheet1 on the left side and double-click it
- Paste the code in the big white field
- The VBA window can now be closed

Best regards,
Trowa

Video liên quan