View Single Post
 
Old 02-20-2017, 04:53 AM
kadr_leyn kadr_leyn is offline Windows 7 32bit Office 2003
Novice
 
Join Date: Feb 2017
Posts: 1
kadr_leyn is on a distinguished road
Default

Data can be parsed to different worksheet according to cell value.

Watch and download example file :https://youtu.be/S-KUHWysAqk

Private Sub Worksheet_Change(ByVal Target As Range)
Dim i As Long
If Target.Column = 8 Then
For i = 5 To Me.Cells(Rows.Count, 1).End(xlUp).Row
If Cells(i, "H").Value = "On hire" Then
Rows(i).Copy
Sheets("On_hire").Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).PasteSpecial xlPasteValues
Rows(i).Delete
i = i - 1
ElseIf Cells(i, "H").Value = "Off hire" Then
Rows(i).Copy
Sheets("Off_hire").Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).PasteSpecial xlPasteValues
Rows(i).Delete
i = i - 1
ElseIf Cells(i, "H").Value = "On sales" Then
Rows(i).Copy
Sheets("On_sales").Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).PasteSpecial xlPasteValues
Rows(i).Delete
i = i - 1
End If
Next i
End If
End Sub
Reply With Quote