#1   Report Post  
Posted to microsoft.public.excel.misc
Noemi
 
Posts: n/a
Default Do Loop

Hi
I have a Do Loop which performs the task required however it does leave one
row left which it should also delete.

In one column I have a K and then numbers or Ktba. The Do Loop is to go down
the column to find and delete all the rows with Ktba in them and only stop
the loop when the column is empty.

The loop does work except it leaves a Ktba behind and I dont understand why.

IF you can see what is wrong with my code and advise me I would really
appreciate it.

count = 4

Do
If Application.Range("J" & count) = "Ktba" Then
Application.Range("J" & count).Select
Selection.EntireRow.Delete
End If

count = count + 1

Loop Until Application.Range("J" & count).value = ""

thanks
Noemi
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
Help with Do...Loop Noemi Excel Discussion (Misc queries) 1 December 7th 05 12:59 AM
hysteresis loop olivekim Charts and Charting in Excel 1 October 28th 05 04:22 AM
Do Loop BobBarker Excel Worksheet Functions 0 August 19th 05 08:44 PM
VB for excel, how do I loop through code steve hobden via OfficeKB.com Excel Discussion (Misc queries) 2 June 9th 05 01:59 PM
loop trough e-mail address list to send task lists with outlook Paul. Excel Discussion (Misc queries) 2 April 14th 05 11:48 AM


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