ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   New Users to Excel (https://www.excelbanter.com/new-users-excel/)
-   -   delete row based on value of ... (https://www.excelbanter.com/new-users-excel/207846-delete-row-based-value.html)

jatman

delete row based on value of ...
 
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


ShaneDevenshire

delete row based on value of ...
 
Hi,

Type the following formula =1/(A10) 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.


--
Thanks,
Shane Devenshire


"jatman" wrote:

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



All times are GMT +1. The time now is 05:25 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com