Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.setup
external usenet poster
 
Posts: 61
Default Help with creating a loop

Im trying to loop (at least thats what I think I do) this code below. I want
it check the last row of data to check if the cell is empty and if so, delete
the entire row.
It only works the once then the sub ends. How would I loop this so that it
checks until all empty cells have been deleted.

Range("u7").End(xlDown).Select
ActiveCell.Offset(0, -16).Select
If ActiveCell.Value = "" Then
ActiveCell.EntireRow.Select
ActiveCell.EntireRow.Delete
Else
End If
  #2   Report Post  
Posted to microsoft.public.excel.setup
external usenet poster
 
Posts: 61
Default Help with creating a loop

Apologies, think i should have put this in programming.

"Woodi2" wrote:

Im trying to loop (at least thats what I think I do) this code below. I want
it check the last row of data to check if the cell is empty and if so, delete
the entire row.
It only works the once then the sub ends. How would I loop this so that it
checks until all empty cells have been deleted.

Range("u7").End(xlDown).Select
ActiveCell.Offset(0, -16).Select
If ActiveCell.Value = "" Then
ActiveCell.EntireRow.Select
ActiveCell.EntireRow.Delete
Else
End If

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
Loop ? chrisnsmith Excel Discussion (Misc queries) 6 February 21st 09 04:54 PM
creating a loop JakeShipley2008 Excel Discussion (Misc queries) 2 September 9th 08 02:17 PM
Creating a loop JakeShipley2008 Excel Discussion (Misc queries) 1 September 8th 08 10:26 PM
Need help creating Loop Jenny B. Excel Discussion (Misc queries) 3 February 15th 07 12:26 AM
Help with Do...Loop Noemi Excel Discussion (Misc queries) 1 December 7th 05 01:59 AM


All times are GMT +1. The time now is 09:06 PM.

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"