Question : Delete rows in excel

Hello,

I am new to Excel and am trying to create a Macro to delete empty rows.  For example, I am trying to delete an entire row if nothing is populated in certain cells within that row (i.e. if nothing is in Column E).

I have attached a very simplified version of what I am trying to do.  I have data in rows 2, 5, and 6, but now want to run a macro that will delete rows 3 and 4 (especially when I have hundreds of lines of data).  

Please provide very basic instructions starting with how to set-up the Macro / Run the Macro.

Thank you,
Megan  
Attachments:
 
File associated with "Delete rows in excel" question
 

Answer : Delete rows in excel

Sorry - also see below for how to add and use code:

On a sheet tab, right click, then click "view code" - this opens the VBA editor.
(Or hit Alt + F11).
On the menu bar at the top, click on insert > module.
This opens a module in the Active workbook.
(If you want to add code to another workbook, select the file from the project explorer on the left of the VB editor.
(If the project explorer is not showing, hit Ctrl + R).

Copy and paste the whole code snippet supplied, adapting anything to suit.
(Or write your own code)
Save the workbook.

You may need to enable macros.
http://office.microsoft.com/en-us/excel/HA100310711033.aspx#12

To run the macro there are a few choices:
http://office.microsoft.com/en-us/excel/HP100141131033.aspx

To add to your personal.xls(b), and thus have the code available at all times:
http://www.rondebruin.nl/personal.htm
Random Solutions  
 
programming4us programming4us