Hello everybody. I hop someone can help me with this. I work with a scale that continuously write the weights values to an excel sheet in one column, I need to cut the values that are out of the range of weight that I need from column B and paste them to column C, one after another and also I need after cut and paste each non desired value that the selected cell return to the next empty cell in column B to the scale continue writing . The range of weight is (>=193 and <=196) or (>192 and <197)
I was working whit this code because I was deleting the entire row with non desired values but now I need to keep them separated.
Sub test()
With ActiveSheet
.AutoFilterMode = False
With Range("B1", Range("B" & Rows.Count).End(xlUp))
.AutoFilter 1, ">196"
On Error Resume Next
.Offset(1).SpecialCells(12).EntireRow.Delete Shift:=x1Up
End With
.AutoFilterMode = False
ActiveCell.Offset(rowOffset:=-1, columnOffset:=0).Activate
End With
End Sub
Thank you.
I was working whit this code because I was deleting the entire row with non desired values but now I need to keep them separated.
Sub test()
With ActiveSheet
.AutoFilterMode = False
With Range("B1", Range("B" & Rows.Count).End(xlUp))
.AutoFilter 1, ">196"
On Error Resume Next
.Offset(1).SpecialCells(12).EntireRow.Delete Shift:=x1Up
End With
.AutoFilterMode = False
ActiveCell.Offset(rowOffset:=-1, columnOffset:=0).Activate
End With
End Sub
Thank you.