how to delete an excel line based on a condition

how to delete an excel line based on a condition

Post by IlRoZSBjcm » Wed, 08 Oct 2008 12:25:01


I generate proposals in Excel. I have a calculation worksheet and a proposal
worksheet. Based on certain product selections, I want to delete the rows of
the products with zero quantities on the proposal worksheet. At the moment it
needs to be done manually, which is tedious. Is there a way to make the rows
with zero quantities "disappear" or be deleted automatically - or on demand?
Any suggestions? (Or will this this require higher level programming?)
 
 
 

how to delete an excel line based on a condition

Post by UGV0ZX » Wed, 08 Oct 2008 13:57:00

Excel functions generally return a value rather than perform an action,
deleting cell values would be deemed as performing an action.

Have you tried using conditional formatting in the cells with values you
want to 'disappear', set the font colour to be the same as the background
colour when the cell value equals zero.
--
Regards - Peter

 
 
 

how to delete an excel line based on a condition

Post by Roger Govi » Wed, 08 Oct 2008 20:04:42

Hi

you could apply an Autofilter to the data.
Select a dropdown on any of the columns with 0 and use Custom>does not
Equal>0
Then print the visible data.

Alternatively, used Advanced Filter to bring across to your Printout Sheet,
only those lines that do not have zero values.
More help on advanced filter can be found at Debra Dalgleish's site
http://www.yqcomputer.com/
--
Regards
Roger Govier