delete row based on value of ...

J

jatman

using a macro to delete a row.

how can i delete a row if the value of a cell is 0 or less...

Column A has an item number
Column B has quantities, from a negative number, 0, and positive numbers

if a cell in Column B is 0 or lower, the row will be deleted. i can delete
rows using F5, Special, Blanks, delete row..., so i am hoping for somthing
like that where i can record a macro to work with.

thank you,

jat
 
S

ShaneDevenshire

Hi,

Type the following formula =1/(A1>0) in a blank column on the first row of
your data. Copy it down. All rows with DIV/0 will be marked for deletion.
Highlight all the cell and press F5, Special, choose Formulas and uncheck all
except Errors. Click OK. Press Ctrl - (Ctrl minus) and choose Entire row,
OK.


If this helps, please click the Yes button.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top