Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 81
Default Delete rows with names

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. Id 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 €śWhats 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
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
Delete & Merge Columns,Delete Rows with filter, etc traderindia Excel Programming 1 July 16th 09 08:17 PM
How do I include names in formula by picking up names from rows Dilip Excel Worksheet Functions 6 June 8th 09 05:51 PM
Sorting and matching rows of names with Socials with master list and eliminating the extra names Giacomo Excel Worksheet Functions 1 March 10th 07 01:52 AM
How to delete rows when List toolbar's "delete" isnt highlighted? Linda Excel Worksheet Functions 1 May 26th 05 08:39 PM
Delete every 3rd row, then delete rows 2-7, move info f/every 2nd row up one to the end and delete the row below Annette[_4_] Excel Programming 2 September 21st 04 02:40 PM


All times are GMT +1. The time now is 04:09 AM.

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

About Us

"It's about Microsoft Excel"