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

Hi,

I'd like to find a cell with the content "This cell" and then I'd
like to delete the row (not only the content of the cell). This is
what I've got:

Sub DeleteRow()
With Worksheets(1).Range("A1:H100")
Set C = .Find("This Cell", LookIn:=xlValues)

' Rows(???).Select
' ??? How to select the row to delete ???

Selection.Delete Shift:=xlUp
End With
End Sub

Thanks and regards,
Armin

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

Sub DeleteRow()
With Worksheets(1).Range("A1:H100")
Set C = .Find("This Cell", LookIn:=xlValues)
if not c is nothing then
c.EntireRow.Delete
End if
End With
End Sub

--
Regards,
Tom Ogilvy


"Armin Ronacher" wrote in message
...
Hi,

I'd like to find a cell with the content "This cell" and then I'd like to
delete the row (not only the content of the cell). This is what I've got:

Sub DeleteRow()
With Worksheets(1).Range("A1:H100")
Set C = .Find("This Cell", LookIn:=xlValues)

' Rows(???).Select
' ??? How to select the row to delete ???

Selection.Delete Shift:=xlUp
End With
End Sub

Thanks and regards,
Armin



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

Tom,
thanks, this is exactly what I was looking for.

Regards
Armin Ronacher


"Tom Ogilvy" schrieb im Newsbeitrag
...
Sub DeleteRow()
With Worksheets(1).Range("A1:H100")
Set C = .Find("This Cell", LookIn:=xlValues)
if not c is nothing then
c.EntireRow.Delete
End if
End With
End Sub

--
Regards,
Tom Ogilvy


"Armin Ronacher" wrote in message
...
Hi,

I'd like to find a cell with the content "This cell" and then
I'd like to delete the row (not only the content of the cell).
This is what I've got:

Sub DeleteRow()
With Worksheets(1).Range("A1:H100")
Set C = .Find("This Cell", LookIn:=xlValues)

' Rows(???).Select
' ??? How to select the row to delete ???

Selection.Delete Shift:=xlUp
End With
End Sub

Thanks and regards,
Armin




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 0 June 21st 05 05:16 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 bhawane Excel Programming 0 June 21st 05 04:53 PM
Macro to delete sheets and saves remaining file does not properly delete module bhawane Excel Programming 0 June 21st 05 04:53 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:14 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"