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: 1
Default Row deleting script problem

Hello Guys!
I have made a script for deleting rows where column A value
is greater than 1280.
It works fine but it will loop endlessly. What can I do about it?
If I delete the "RowNumber = RowNumber - 1" then it does'nt
work properly.

TotalRows = Application.CountA(ActiveSheet.Range("A:A"))
Cells(1, 1).Select
For RowNumber = 1 To TotalRows
If Cells(RowNumber, 1).Value 1280 Then
Cells(RowNumber, 1).Select
Selection.EntireRow.Delete
RowNumber = RowNumber - 1
End If
Next

Please help me,
Little Jessica



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/

 
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
script for deleting images Gor_yee Excel Discussion (Misc queries) 2 October 29th 07 12:38 PM
OsCommerce - Easy Populate Script - CSV/TXT Conversion Problem. PriceTrim Excel Discussion (Misc queries) 3 July 5th 05 05:27 PM
deleting a macro resulted in a problem militant Excel Discussion (Misc queries) 9 April 29th 05 08:01 PM
networkdays() problem when deleting row or column Jason Excel Worksheet Functions 0 April 8th 05 11:09 PM
Graph problem with VBA script Jon Peltier[_3_] Excel Programming 0 August 7th 03 02:05 AM


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