LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 57
Default Deleting several rows with given criteria

It's working, Thanks!



"Jacob Skaria" wrote:

You can try out the below macro which will look at ColumnA and delete all
entries which satisfy the criteria. If you are new to macros..

--Set the Security level to low/medium in (Tools|Macro|Security).
--From workbook launch VBE using short-key Alt+F11.
--From menu 'Insert' a module and paste the below code.
--Get back to Workbook.
--Run macro from Tools|Macro|Run <selected macro()

Sub DeleteRows()
Dim lngRow As Long
For lngRow = Cells(Rows.Count, 1).End(xlUp).Row To 1 Step -1
If Range("A" & lngRow) Like "*0100*" Then Rows(lngRow).Delete
Next
End Sub

If this post helps click Yes
---------------
Jacob Skaria


"Rechie" wrote:

I have 1 thousand lines/rows in a sheet.
I want to delete rows that contains "0100" text or maybe number.

Thanks.
Rechie

 
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
Deleting rows by specified criteria for duplicates Tasha Excel Discussion (Misc queries) 4 September 9th 08 10:48 AM
Deleting Rows w/ Specific Criteria MCSHMCH Excel Discussion (Misc queries) 2 September 28th 07 01:05 PM
Help!! I have problem deleting 2500 rows of filtered rows!!!! shirley_kee Excel Discussion (Misc queries) 1 January 12th 06 03:24 AM
Deleting/IDing Rows that Don't Meet Criteria LittleAndLost Excel Worksheet Functions 1 November 3rd 04 07:21 PM
Deleting/IDing Rows that Don't Meet Criteria LittleAndLost Excel Worksheet Functions 2 November 3rd 04 01:32 PM


All times are GMT +1. The time now is 03:53 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"