I have part numbers in column A and column B has the qty's. Does someone have a code if any cells in column B has a zero then clear the cells next to column A?
I have part numbers in column A and column B has the qty's. Does someone have a code if any cells in column B has a zero then clear the cells next to column A?
SHAZAM!
[vba]
Public Sub ProcessData()
Const TEST_COLUMN As String = "B" '<=== change to suit
Dim i As Long
Dim iLastRow As Long
With ActiveSheet
iLastRow = .Cells(.Rows.Count, TEST_COLUMN).End(xlUp).Row
For i = 1 To iLastRow
If .Cells(i, TEST_COLUMN).Value = 0 Then
.Cells(i, TEST_COLUMN).Offset(0, -1).Value = ""
End If
Next i
End With
End Sub
[/vba]
____________________________________________
Nihil simul inventum est et perfectum
Abusus non tollit usum
Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
James Thurber
Thank You xld it's perfect!!
SHAZAM!