Saturday, December 17, 2011

How to Remove Cells with Zeros from Excel 2007


1. Click 'Alt' and 'F11' to open the Visual Basic Editor (VBE).
2. Click 'Insert' and then click 'Module.'
3. Cut and paste the following code into the blank window:Sub CleanZeros()Dim c As RangeFor Each c In ActiveSheet.UsedRangeIf c = 0 And Len(c) > 0 Then c.DeleteNext cEnd Sub
4. Press 'F5' to run the macro.

Blogger news