Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Loop

I need assistance with the following code.

I am trying to run through a table of values. For this particula
table, there are empty rows which i would like to delete. There can b
one or more empty rows in the table.

I have written the code but it doesn't work properly because the loo
never ends. Can somebody help me on this? Thanks a lot!

With Worksheets("SGTemp")
intRow = 2
intLastRow = .Cells(Rows.Count, 1).End(xlUp).Row

For intRow = 2 To intLastRow
If IsEmpty(.Cells(intRow, 1)) Then
Range("A" + Format(intRow) + ":B"
Format(intRow)).Select
Selection.Delete Shift:=xlUp
intRow = intRow - 1
End If
Next intRow
End Wit

--
Message posted 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
Find loop doesn't loop JSnow Excel Discussion (Misc queries) 2 June 24th 09 08:28 PM
help with a loop BeJay Excel Discussion (Misc queries) 3 May 19th 06 12:24 PM
getting out of a if loop rk0909 Excel Discussion (Misc queries) 3 April 11th 06 03:55 PM
HELP!!!! Can't stop a loop (NOT an infinite loop) TBA[_2_] Excel Programming 3 December 14th 03 03:33 PM
Help with a Loop please Kamal[_3_] Excel Programming 2 September 14th 03 12:30 AM


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