Results 1 to 4 of 4

Thread: Last Row in Excel

  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2000
    Posts
    9
    Hi,

    I use this code to find the last row in an excel spreadsheet:

    ActiveCell.SpecialCells(xlCellTypeLastCell).Select
    iLastRow = ActiveCell.Row

    But if I erase this last cell and I ask the program for the new last cell, it gives me the old last cell ???

    Does anybody knows how to find the new last cell ?


  2. #2
    Addicted Member
    Join Date
    Jan 2000
    Location
    Fresno, California, USA
    Posts
    195
    My guess(!) is that you need to delete the last cell, not erase it.

  3. #3

    Thread Starter
    New Member
    Join Date
    Mar 2000
    Posts
    9
    Thank you HBR, I tried what you told me but the result was the same as above...

    Another suggestion ?

  4. #4

    Thread Starter
    New Member
    Join Date
    Mar 2000
    Posts
    9
    Thank you Nitro, your code exactly fit my purpose and thank
    you Lyla, I've found a lot of useful tips on this site...

    Nankien

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width