PC Review


Reply
Thread Tools Rate Thread

Delete rows with names

 
 
TGalin
Guest
Posts: n/a
 
      18th Nov 2009
Sub Deletenames()

Dim Going As Long
Dim Far As Long
Dim Pass As Range
Going = ActiveSheet.Cells(10000, 2).End(xlUp).Row
For Far = Going To 1 Step -1
Set Pass = ActiveSheet.Range("N" & Far)
If Pass.Value = "Every name but name entered in textbox" Then
Pass.Offset(-1).Resize(2).EntireRow.Delete
End If
Next Far

End Sub

I am looking for assistance with this code. I’d like to add additional
steps to the start of it. Ideally I would like to run this macro and have a
textbox appear with a message that reads “What’s your name?” Below this
question is an empty field with a combo box linked to various different names
on “Sheetlookhere” N2:N1000. Whatever name is selected into the combo box
will be searched on SheetEmployee1, SheetEmployee2, and SheetEmployee3. Each
row in Column N that does not contain the name that was selected will be
deleted + the row above it will also be deleted. Can you advise?

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Autofil on variable rows, delete extract and show remaining rows 1plane Microsoft Excel Programming 3 17th Nov 2009 10:49 AM
Hpw do I delete multiple empty rows found between filled rows? Bill Microsoft Excel Worksheet Functions 1 15th Nov 2009 12:52 AM
How do I include names in formula by picking up names from rows Dilip Microsoft Excel Worksheet Functions 6 8th Jun 2009 05:51 PM
Copy pasting Rows, but need to Delete any Shapes/Pictures that are within copied rows Corey Microsoft Excel Programming 2 1st Aug 2007 02:02 AM
Sorting and matching rows of names with Socials with master list and eliminating the extra names Giacomo Microsoft Excel Worksheet Functions 1 10th Mar 2007 01:52 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:12 PM.