deletion macro

B

Bob

Hello All,

I need help with a simple macro to delete an entry and
then delete the row that contained that entry.

Column A contains numbers. I would like to enter a number
in say cell D1. If that number is in column A then delete
that number and the row.

Thanks for any help!
Bob P.
 
T

Tom Ogilvy

if there are two adjacent rows both having the value in D1, this will only
delete one of them. (In xl97 or later)

Looping in reverse, as shown by some of the other posters will avoid this.
 
S

steve

Thanks Ken! Got a bit rushed...

--
sb
Ken Wright said:
Slight typo, you need the second set of Quotes on the ("A:A) bit, eg ("A:A").

--
Regards
Ken....................... Microsoft MVP - Excel
Sys Spec - Win XP Pro / XL2K & XLXP

-------------------------------------------------------------------------- --
Attitude - A little thing that makes a BIG difference
-------------------------------------------------------------------------- --
 
Top