Macro help

  • Thread starter Thread starter Valerie
  • Start date Start date
V

Valerie

I want Excel to find the first blank row of a downloaded
worksheet and select the cell in col A. I can get the
cursor to the last cell of the worksheet but then I want
it to return to column A.

Thanks!
Valerie
 
With ActiveSheet
.Cells(.Cells.SpecialCells(xlCellTypeLastCell).Offset(1, 0).Row, 1).Select
End With
 
Works like a charm!! Thanks so much!
-----Original Message-----

With ActiveSheet
.Cells(.Cells.SpecialCells(xlCellTypeLastCell).Offset (1, 0).Row, 1).Select
End With



.
 
Hi Myrna,

I tried this on an existing SS (this sheet has data to
Row 156 and formulas to Row 500. I kept getting the
following error message.

Run-time error '1004'
Application-defined or object-defined error


Then I tried it on a new sheet with only a few random
entries, no formulas, it worked fine. Then I added a
simple formula "=if(A1="","",A1)" and copied this down a
few rows. This also worked but it found the last row
that had a formula in it even with Col A empty at that
point.

I guess I have two questions....one...why am I getting
the Run-time error on the one sheet? And....two....is
there a way to search for the row with the last entry and
not the last formula?

Hope I've explained this so you can understand me.

Have a good day,

Don
 
Back
Top