Forum Moderators: open

Message Too Old, No Replies

Keyword work in Excel

Looking for a macro or function

         

Fiver

4:21 pm on Mar 26, 2004 (gmt 0)

10+ Year Member



I'm looking for a function or macro or logical process in excel that allows me to delete an entire row based on a partial keyword match within a cell.

logically:
if cell contains 'key'
delete.entire.row

across a column, or whole spreadsheet.
I'm not certain if this is the best forum for it, but I've seen other excel questions answered here, and I imagine others have run into similar problems with their keyword manipulation.

Anyone know how I could find/accomplish this?
thanks!

JackieLane

3:34 pm on Apr 9, 2004 (gmt 0)

10+ Year Member



Here's how you can set up a macro to do it.

1. From the top menu, select tools --> macro --> record new macro. (You'll need to give it a name and assign a short-cut key such as "ctrl-q" at this point.)
2. While the macro is recording, from the top menu, select edit --> find, and then type what you're searching for in the pop-up box. Select "find next".
3. Hit "Esc" on your keyboard.
4. From the top menu, select edit --> delete... --> entire row.
5. Stop the macro recording by selecting the small square in the pop-up box that appeared when you starting recording the macro.

You should now be able to repeat the macro by simply pressing ctrl-q (or whatever shortcut you assigned it).

nakulgoyal

4:12 am on Apr 11, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I usually use some text editors to play with things like these and works great for me. :-)

gopi

1:06 am on Apr 12, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



just save it as text file , ftp to a *nix box and "grep -v [keyword] [filename] > [filename]"

ergophobe

2:55 pm on Apr 12, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



or use one of the windows ports of grep, egrep, bkreplacem, whatever (just to mention free tools).

jaanis

10:26 pm on Apr 16, 2004 (gmt 0)

10+ Year Member



How about a double keyword delete option in excel? Any ideas for that?