![]() |
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? |
All times are GMT +1. The time now is 06:42 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com