Loop problem
Posted by DAVID on February 12, 2002 10:46 AM
How can i loop a worksheet but only the filtered list.
This is the code im using , but this goes thru the whole sheet .
I need something that goes thru the filtered list only
Sub DISCC()
Range("A2").Activate
Do
If ActiveCell.Offset(0, 4).Value = "X" And ActiveCell.Offset(0, 2).Value > 0 Then
ActiveCell.Offset(0, 3).Value = ActiveCell.Offset(0, 1) - ActiveCell.Offset(0, 1) * ActiveCell.Offset(0, 2)
End If
ActiveCell.Offset(1, 0).Activate
Loop Until ActiveCell = Empty
Range("A1").Activate
End Sub