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

would anybody be able to give me code to do the following;

i have a list of destinations A-Z, with 2 columns of data
in columns B & C

i would like to find specific destination names,
forexample 'France,Paris', and then delete the whole row
which that destination is on. I would then like to repeat
this several times

thanks in advance for any help
Dave
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 41
Default VBA to Find & Delete

I have some sample code to do this at www.rubbershoe.com/deleterows.htm

"Dave" wrote in message
...
would anybody be able to give me code to do the following;

i have a list of destinations A-Z, with 2 columns of data
in columns B & C

i would like to find specific destination names,
forexample 'France,Paris', and then delete the whole row
which that destination is on. I would then like to repeat
this several times

thanks in advance for any help
Dave



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default VBA to Find & Delete

Tim,

this worked for 1 value, how would I make this work for
say 3 different values, I tried adding the following line
for each one but the macro failed

Sub FindNDelete1()
Application.ScreenUpdating = False
Dim lngRow As Long, lngLastRow As Long
lngLastRow = Cells(Rows.Count, "A").End(xlUp).Row
For lngRow = lngLastRow To 1 Step -1
If Cells(lngRow, "A").Value = "Germany,Munich" Then
Cells(lngRow, "A").EntireRow.Delete
If Cells(lngRow, "A").Value = "France,Paris" Then
Cells(lngRow, "A").EntireRow.Delete
End If
Next lngRow
Application.ScreenUpdating = True
End Sub

regards
Dave
-----Original Message-----
I have some sample code to do this at

www.rubbershoe.com/deleterows.htm

"Dave" wrote in message
...
would anybody be able to give me code to do the

following;

i have a list of destinations A-Z, with 2 columns of

data
in columns B & C

i would like to find specific destination names,
forexample 'France,Paris', and then delete the whole row
which that destination is on. I would then like to

repeat
this several times

thanks in advance for any help
Dave



.

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 Karen[_3_] Excel Worksheet Functions 2 March 5th 08 02:50 AM
Find and delete Philip Drury Excel Worksheet Functions 3 October 4th 07 07:33 PM
Find and delete! Philip Drury Excel Discussion (Misc queries) 0 October 3rd 07 02:36 PM
find a value and delete that row TUNGANA KURMA RAJU Excel Discussion (Misc queries) 11 January 29th 07 09:50 AM


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