Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Find & Delete Rows

I have never written a Vba script. If there is a more appropriate forum for
me, please point me to it. If you are able to help here, please do so in
explicit step by step form. I found what appear to be answers on Google, ran
a simple macro, then tried to copy and paste the answers into my macro -
didn't work.

There are 2 problems, which (I think) are similar. They will be in different
workbooks and unrelated.

1) I have a column full of either "a" or "b". I want to find every "b" value
and delete the entire row it's in.

2) A workbook has names in one column, some of which are duplicated,
sometimes repeated 3 or 4 times. I want to retain the first row with each
name and delete rows with duplicates.

Any assistance is very much appreciated

Steve Wallis

(Change yahoo to bigpond)


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Find & Delete Rows

Hi Steve,

1) I have a column full of either "a" or "b". I want to find every "b"
value and delete the entire row it's in.


Use Data | Filter | AutoFilter and set the filter criterion to 'b' and
simply delete the filtered rows.

If you are not familiar with the Autofilter feature, see Debra Dalgleish's
excellent tutorial (replete with informative screenshots) at:

http://www.contextures.com/xlautofilter01.html


2) A workbook has names in one column, some of which are duplicated,
sometimes repeated 3 or 4 times. I want to retain the first row with each
name and delete rows with duplicates.


In this case, use the Advanced filter feature, selecting the *Unique
Records* option.
Debra Dalgleish also has a similarly excellent tutorial on Advanced Filters
at:

http://www.contextures.com/xladvfilter01.html

Finally, If you have a reason for wanting to accomplish these tasks using
VBA, please post back.

---
Regards,
Norman



"Steve Wallis" wrote in message
...
I have never written a Vba script. If there is a more appropriate forum for
me, please point me to it. If you are able to help here, please do so in
explicit step by step form. I found what appear to be answers on Google,
ran a simple macro, then tried to copy and paste the answers into my
macro - didn't work.

There are 2 problems, which (I think) are similar. They will be in
different workbooks and unrelated.

1) I have a column full of either "a" or "b". I want to find every "b"
value and delete the entire row it's in.

2) A workbook has names in one column, some of which are duplicated,
sometimes repeated 3 or 4 times. I want to retain the first row with each
name and delete rows with duplicates.

Any assistance is very much appreciated

Steve Wallis

(Change yahoo to bigpond)



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Find & Delete Rows

Thanks Norman. Both solutions work beautifully and no, I've no particular
wish to get involved in VBA if it is avoidable.


Steve


"Norman Jones" wrote in message
...
Hi Steve,

1) I have a column full of either "a" or "b". I want to find every "b"
value and delete the entire row it's in.


Use Data | Filter | AutoFilter and set the filter criterion to 'b' and
simply delete the filtered rows.

If you are not familiar with the Autofilter feature, see Debra Dalgleish's
excellent tutorial (replete with informative screenshots) at:

http://www.contextures.com/xlautofilter01.html


2) A workbook has names in one column, some of which are duplicated,
sometimes repeated 3 or 4 times. I want to retain the first row with each
name and delete rows with duplicates.


In this case, use the Advanced filter feature, selecting the *Unique
Records* option.
Debra Dalgleish also has a similarly excellent tutorial on Advanced
Filters at:

http://www.contextures.com/xladvfilter01.html

Finally, If you have a reason for wanting to accomplish these tasks using
VBA, please post back.

---
Regards,
Norman



"Steve Wallis" wrote in message
...
I have never written a Vba script. If there is a more appropriate forum
for me, please point me to it. If you are able to help here, please do so
in explicit step by step form. I found what appear to be answers on
Google, ran a simple macro, then tried to copy and paste the answers into
my macro - didn't work.

There are 2 problems, which (I think) are similar. They will be in
different workbooks and unrelated.

1) I have a column full of either "a" or "b". I want to find every "b"
value and delete the entire row it's in.

2) A workbook has names in one column, some of which are duplicated,
sometimes repeated 3 or 4 times. I want to retain the first row with each
name and delete rows with duplicates.

Any assistance is very much appreciated

Steve Wallis

(Change yahoo to bigpond)





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
find and delete rows macro clayton ledford Excel Discussion (Misc queries) 4 January 20th 09 03:34 PM
find text and delete rows. John Excel Discussion (Misc queries) 5 December 12th 07 04:25 AM
Find and delete all other rows Murray Excel Discussion (Misc queries) 1 August 7th 07 02:54 AM
find and delete rows sulie[_2_] Excel Programming 2 June 7th 05 09:47 AM
Find according to sheet 2, Delete rows in COL A Rubix³ Excel Programming 3 June 24th 04 12:12 AM


All times are GMT +1. The time now is 03:21 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"