LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 127
Default What is wrong with this Macro?

Hi Experts:

I have used this macro before and it worked perfectly...however, now when it
searches and deletes the rows that I want it to, it takes forever to go
through the document....It used to go through very fast and deleted the rows,
but now it deletes one row at a time very slowly....I have about 10000
records for it to go through and delete the records that are in the macro and
it takes a long time to complete...What might be wrong with this Macro?

Sub DeleteLOATermedDupRecords()
'
' DeleteLOATermedDupRecords Macro
' Macro recorded 2/17/2008 by Jeannie Vincovich
'
For i = 1 To 12000
If Cells(i, "J") = "LOA" Or Cells(i, "J") = "Termed" Or _
Cells(i, "J") = "Duplicate" Then
Rows(i & ":" & i).Select
Selection.Delete Shift:=xlUp
i = i - 1
End If
Next i

End Sub


Any help you can provide would be greatly appreciated.
--
jeannie v
 
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 linking to wrong workbook Tim879 Excel Discussion (Misc queries) 2 August 31st 07 03:36 PM
Macro paths wrong after save Kevin M[_2_] Excel Discussion (Misc queries) 3 April 17th 07 03:24 PM
This Macro halts any ideas what could be wrong pano Excel Worksheet Functions 4 February 24th 07 06:26 AM
Whats wrong with this macro please Mike Excel Discussion (Misc queries) 6 February 5th 06 09:31 PM
macro results wrong Joseph Tibiita Charts and Charting in Excel 2 June 30th 05 05:32 PM


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