Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 23
Default deleting rows conditional... help!!!

Is there a way to delete rows if they fit a condition?

For example:

Sheet 1 contains all the names.
Sheet 2 contains names I want to get rid of the whole row.
Sheet 3 what I want to end up with.

SHEET 1
A
B
C
D

SHEET 2
A
B

SHEET 3
C
D

Can anyone give me a step by step guide on how to do this please as I do not
know a lot on excel or visual basic.

Cheers

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,123
Default deleting rows conditional... help!!!

Hi laandmc

See
http://www.rondebruin.nl/delete.htm

Read the infor below the first macro and use this in the macro

If Not IsError(Application.Match(.Value, _
Array("jelle", "ron", "dave"), 0)) Then .EntireRow.Delete

'Or use this one with Application.Match if you want to check more values.
'in the cell. You can also use a range with the values to delete.
'Replace Array("jelle", "ron", "dave") with Sheets("Sheet1").Range("A1:A200")


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"laandmc" wrote in message ...
Is there a way to delete rows if they fit a condition?

For example:

Sheet 1 contains all the names.
Sheet 2 contains names I want to get rid of the whole row.
Sheet 3 what I want to end up with.

SHEET 1
A
B
C
D

SHEET 2
A
B

SHEET 3
C
D

Can anyone give me a step by step guide on how to do this please as I do not
know a lot on excel or visual basic.

Cheers

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
deleting rows mohavv Excel Discussion (Misc queries) 1 November 27th 07 04:20 AM
Help!! I have problem deleting 2500 rows of filtered rows!!!! shirley_kee Excel Discussion (Misc queries) 1 January 12th 06 03:24 AM
deleting hidden rows so i can print only the rows showing?????? jenn Excel Worksheet Functions 0 October 6th 05 04:05 PM
Deleting a conditional format Mark Strohmeyer Excel Discussion (Misc queries) 2 December 20th 04 11:39 PM
deleting a conditional format [email protected] Excel Discussion (Misc queries) 4 December 7th 04 10:45 PM


All times are GMT +1. The time now is 08:33 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"