LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 123
Default delete row on basic of cell

HI,

I wish to delete entire row if value in col J is "--"

I did some work but not working properly.
data id huge of 400 rows.

Thanks for help.
Boss


Sub delete()
Dim rng As Range
Dim rngAll As Range

Set rngAll = Range("j:j")

For Each rng In rngAll
If rng.Value = "--" Then

rng.EntireRow.Delete
End If
Next rng

Set rng = Nothing
Set rngAll = Nothing

End Sub

 
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
Visual Basic Protection and Delete Modules Jeremy Excel Discussion (Misc queries) 3 April 27th 10 02:32 PM
How to delete rows in visual basic Ruben Excel Discussion (Misc queries) 3 August 27th 08 09:43 AM
How to delete rows in visual basic Ruben Excel Discussion (Misc queries) 3 August 20th 08 03:50 PM
Delete Rows if any cell in Column H is blank but do not Delete Fir manfareed Excel Programming 4 September 28th 07 05:20 PM
Very Basic Problem - Merged Cell Equals Contents of a Single Cell jollynicechap Excel Worksheet Functions 3 December 29th 06 08:16 PM


All times are GMT +1. The time now is 04:06 PM.

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"