#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 20
Default Delete Row

I need to delete an entire row based on a name entered into an input
box that would match a worksheet with that name in column "A".


Thanks,
Bernie

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default Delete Row

Do you mean that if a name is entered into the InputBox and it matches a name
already entered "somewhere" in Column "A" , that you want to delete the
entire row for the cell location of the name in column "A"?

Sub anyName()
lr = Cells(Rows.Count, 1).End(xlUp).Row
Response = Application.InputBox("Enter a name", "Name to find", , , , , , 2)
For i = 1 To lr
If LCase(Cells(i, 1).Value) = LCase(Response) Then
Cells(i, 1).EntireRow.Delete
End If
Next
End Sub

"Bernie" wrote:

I need to delete an entire row based on a name entered into an input
box that would match a worksheet with that name in column "A".


Thanks,
Bernie


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
Macro to delete sheets and saves remaining file does not properly delete module pherrero Excel Programming 1 June 22nd 05 01:12 AM
Macro to delete sheets and saves remaining file does not properly delete module bhawane Excel Programming 0 June 21st 05 04:54 PM
Macro to delete sheets and saves remaining file does not properly delete module bhawane Excel Programming 0 June 21st 05 04:53 PM
Macro to delete sheets and saves remaining file does not properly delete module pherrero Excel Programming 0 June 21st 05 04:38 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 12:10 AM.

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"