+ Reply to Thread
Results 1 to 11 of 11

Selecting last row

  1. #1
    Valued Forum Contributor
    Join Date
    11-27-2013
    Location
    Brooklyn, NY
    MS-Off Ver
    Office 365
    Posts
    1,172

    Selecting last row

    Hello all.
    This part of my code is causing errors:
    Please Login or Register  to view this content.

  2. #2
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,615

    Re: Selecting last row

    I don't know how is defined LR, neither what is assigned to it, neither what is the error message, but if line ather Then works, try the following after Else:
    Please Login or Register  to view this content.
    Best Regards,

    Kaper

  3. #3
    Valued Forum Contributor
    Join Date
    11-27-2013
    Location
    Brooklyn, NY
    MS-Off Ver
    Office 365
    Posts
    1,172

    Re: Selecting last row

    Oh whooops! I forgot to define the last row. How silly
    i'll let you know if my code works.

  4. #4
    Valued Forum Contributor
    Join Date
    11-27-2013
    Location
    Brooklyn, NY
    MS-Off Ver
    Office 365
    Posts
    1,172

    Re: Selecting last row

    Unfortunately neither the code you posted or defining the last row worked
    This is how i am defining the last row:
    Please Login or Register  to view this content.
    Any other ideas?

  5. #5
    Registered User
    Join Date
    05-11-2014
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Selecting last row

    LR is only a number.
    Range needs a column too.
    I believe you should use Rows(LR).select
    Or something like it , at work now typing on my phone so I can't test it.

  6. #6
    Valued Forum Contributor
    Join Date
    11-27-2013
    Location
    Brooklyn, NY
    MS-Off Ver
    Office 365
    Posts
    1,172

    Re: Selecting last row

    Thanks.
    I tried it but it didn't work.

  7. #7
    Forum Contributor
    Join Date
    11-26-2011
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    159

    Re: Selecting last row

    Have you declared a LR as variable.

    Please Login or Register  to view this content.

  8. #8
    Valued Forum Contributor
    Join Date
    11-27-2013
    Location
    Brooklyn, NY
    MS-Off Ver
    Office 365
    Posts
    1,172

    Re: Selecting last row

    Yes, i did

  9. #9
    Registered User
    Join Date
    05-11-2014
    MS-Off Ver
    Excel 2007
    Posts
    7

  10. #10
    Valued Forum Contributor
    Join Date
    11-27-2013
    Location
    Brooklyn, NY
    MS-Off Ver
    Office 365
    Posts
    1,172

    Re: Selecting last row

    Here is my entire code (sorry )i made the font of the issue in the code red:
    Please Login or Register  to view this content.

  11. #11
    Registered User
    Join Date
    05-22-2014
    Posts
    4

    Re: Selecting last row

    Hi kosherboy, I hope this video would help.

    https://www.youtube.com/watch?v=K0VqyXLJBOw

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Selecting all data in specific columns without selecting adjacent column.
    By EnigmaMatter in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-11-2014, 02:20 AM
  2. Selecting all data in specific columns without selecting adjacent column.
    By EnigmaMatter in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-10-2014, 03:50 PM
  3. Error When Selecting Sheet then Selecting Range
    By jordan2322 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-08-2012, 04:11 AM
  4. Selecting most of a row
    By gwithey in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 01-20-2009, 12:11 PM
  5. Selecting every odd row
    By instauratio in forum Excel General
    Replies: 2
    Last Post: 06-15-2005, 04:05 PM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1