View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Ron de Bruin Ron de Bruin is offline
external usenet poster
 
Posts: 11,123
Default Getting wrong last cell when using usedrange in macro in Excel


See also
http://www.rondebruin.nl/last.htm

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm




"Michael Arch" wrote in message ...
This happens when the cells are formatted, although there is no data excel
thinks there is. To avoid this issue, you may want to delete all cells below
Y10 using the Ctrl - short cut is the fastest way.
Alternatively, you could use this:
iLastrow= Range("Y65536").end(xlup).Row

--
If this posting was helpful, please click on the Yes button.
Regards,

Michael Arch.




"JeffL" wrote:

I've been told that using ActiveSheet.UsedRange will reset the special cell
LastCell after deleting from a sheet, but Excel says the last cell is at Y102
when it should be Y10. There is nothing on row 102 at all. What's happening?