Consulting

Results 1 to 5 of 5

Thread: Solved: Specific cell selection

  1. #1

    Solved: Specific cell selection

    Dears,

    Do you know how to force Macro to select the last row in Excel sheet
    even if the sheet contains multiple blank rows..

    I tried this code but I stucked in between balnk rows

    [vba]Windows("Input.txt").Activate
    Range("A1").Select
    Selection.End(xlDown).Select[/vba]

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    [vba]

    Windows("Input.txt").Activate
    With Activesheet

    .Cells(.Rows.Count, "A").End(xlUp).Select
    End With
    [/vba]
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  3. #3
    Dear Thanks a lot, I just would like to go down one more row
    Sorry

  4. #4
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    [vba]

    Windows("Input.txt").Activate
    With Activesheet

    .Cells(.Rows.Count, "A").End(xlUp).Offset(1, 0).Select
    End With
    [/vba]
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  5. #5
    VBAX Sage
    Joined
    Apr 2007
    Location
    United States
    Posts
    8,729
    Location
    [VBA]
    Windows("Input.txt").Activate
    With Activesheet

    .Cells(.Rows.Count, "A").End(xlUp).Offset(1,0).Select
    End With
    [/VBA]

    Paul

Posting Permissions

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