PDA

View Full Version : Solved: Clear Content of a4:q900 if=0



mike31z
04-07-2012, 06:12 PM
I need help with a macro that will clear contents if the cell value is 0 (zero) and the range of cells is A4:Q900 on the active worksheet which is named "results". I copy the contents of the worksheet from an identical worksheet full of formulas to the results worksheet.
Because I copy a larger range then always needed there are zero "0" in some of the empty cells and they affect sorting.

Thanks
Mike in Wisconsin:beerchug:

Happy Easter

Paul_Hossler
04-07-2012, 06:26 PM
Mike in Wisconsin --

Maybe ...


Sub ClearZero()
Call ActiveSheet.Range("A4:Q900").Replace(0, vbNullString, xlWhole)
End Sub


Paul

mike31z
04-08-2012, 05:41 AM
Thanks Paul that worked just fine.:friends: