Friday, March 18, 2011

How: delete cells with zeros in Excel 2007

Delete cells with zeros in Excel 2007 hand can be tedious and time consuming.

This is especially true if your worksheet contains a lot of data. A solution is to use a Visual Basic for applications (VBA) macro. A macro is a piece of executable VBA code that can automatically perform a task. This macro removes cells, the 0 (zero) and reassemble, which removes cells below the cell. Difficulty: average

Instructions

You need: Excel 2007 things
  1. 1

    Click on "Old" and "F11" to open the Visual Basic (LCA) editor.

  • 2

    Click "Insert" and then on "Module".

  • 3

    Cut and paste the following code into the blank window: Sub clean Zeros () Dim C as RangeFor of each ActiveSheet.UsedRange if C = 0, Len (c) > 0 then c.DeleteNext deque::cend sub

  • 4

    Press the "F5" key to run the macro.

  • No comments:

    Post a Comment