Column "A", where the zero value where the column "B" must be cleared in the Value
Column "A", where the zero value where the column "B" must be cleared in the Value
Try this
Sub ColumnC_value()
Dim LastRow As Long
Sheets("sheet1").Range("A1").End(xlDown).Select
LastRow = ActiveCell.Row
For r = 2 To LastRow
ref = Cells(r, 1).Value
Value = Cells(r, 2).Value
If ref <> 0 Then
Cells(r, 3).Value = Cells(r, 2).Value
Else
End If
Next r
End Sub
Or you could try this on a copy of your workbook to see if it fits your needs.
On a large range it should be slightly faster.
Sub With_AutoFilter() Application.ScreenUpdating = False With Sheets("Sheet1").Range("A2:C" & Cells(Rows.Count, 1).End(xlUp).Row) .AutoFilter 1, "0.000" End With Range("B3:B" & Cells(Rows.Count, 2).End(xlUp).Row).SpecialCells(12).ClearContents ActiveSheet.AutoFilterMode = False Application.ScreenUpdating = True End Sub
Thank for Replay it great work.