Thread: blank rows
View Single Post
  #9   Report Post  
Posted to microsoft.public.excel.programming
Phil H Phil H is offline
external usenet poster
 
Posts: 7
Default blank rows

Jim, this works best for me. Thanks!!

"Jim Thomlinson" wrote:

xlLastCell and Usedrange are both dependant on the state of the spreadsheet
when it was last saved... This makes both functions a little dangerous. You
are better off to use a function that moves up from the las cell in a column
sismlar to...

sheets("Sheet1").range("A65535").end(xlUp).offset( 1,0).select

This selects the first blank cell in Column A looking up from row 65,535.
You can change the sheet the the column and or the cell that you are looking
up from... So long as the bottom of the sheet is not "Ragged" then this works
great.

HTH

"Phil H" wrote:

How do you append new rows to the end of a workbook?

If I find the last row using ActiveCell.SpecialCells(xlLastCell).Row and
append my stuff, I often find blank rows above the newly appended ones
because somebody had entered data and then cleared it, which moves the
LastCell downwards.

I am trying to delete the blank rows by looping thru all rows to detect
blank ones, but the IsBlank function won't work in VBA. Are there
workarounds?