Results 1 to 8 of 8
  1. #1
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    select last cell (2000)

    i want select last cell filled and assign this in a variable in text format, in my case is L20...

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: select last cell (2000)

    Last cell filled in what? In the entire worksheet, or in column L?

  3. #3
    Gold Lounger
    Join Date
    Feb 2004
    Location
    Cape Town, RSA
    Posts
    3,444
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: select last cell (2000)

    Dim LastCell as String
    Range("L1").select
    Selection.End(xlDown).Select
    LastCell=Activecell.value

    I don't understand your question, but is this pointing in the right direction?
    Regards,
    Rudi

  4. #4
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    South Carolina, USA
    Posts
    7,295
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: select last cell (2000)

    Your code will not work if there are any empty cells in the column.
    Legare Coleman

  5. #5
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    South Carolina, USA
    Posts
    7,295
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: select last cell (2000)

    If you are talking about the last filled cell in column L, then:

    <pre>Dim strLast As String
    strLast = Format(ActiveSheet.Range("L65536").End(xlUp).Value ,"dd/mm/yyyy")
    </pre>

    Legare Coleman

  6. #6
    Gold Lounger
    Join Date
    Feb 2004
    Location
    Cape Town, RSA
    Posts
    3,444
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: select last cell (2000)

    Thanx, I do realize that Legare, but I am just trying to get the just of the question, and the attached graphic does not show blanks. If Sal1 does have blanks the code can be modified. <img src=/S/smile.gif border=0 alt=smile width=15 height=15>
    Regards,
    Rudi

  7. #7
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: select last cell (2000)

    ... column L

  8. #8
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: select last cell (2000)

    In that case, Legare has answered your question in <post#=411597>post 411597</post#>.

Posting Permissions

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