I currently am using the following code to cut and paste a row of information to a different tab based upon if the value "x" is in a cell.
it works great but i want to change it so that it only copies the first 11 rows not the entire row (so A to K).
This is the working code
Any help is much apreciated
it works great but i want to change it so that it only copies the first 11 rows not the entire row (so A to K).
This is the working code
Code:
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
' Code goes in the Worksheet specific module
Dim rng As Range
' Set Target Range
Set rng = Target.Parent.Range("K2:K200")
' Only look at single cell changes
If Target.Count > 1 Then Exit Sub
' Only look at that range
If Intersect(Target, rng) Is Nothing Then Exit Sub
' Action if Condition(s) are met
Select Case Target.Text
Case "x"
Target.EntireRow.Cut Sheets("Sheet2").Cells(Rows.Count, "A").End(xlUp).Offset(1)
Case Is = ""
Target.EntireRow.Cut Sheets("Monitoring").Cells(Rows.Count, "A").End(xlUp).Offset(1)
End Select
End Sub
Any help is much apreciated