+ Reply to Thread
Results 1 to 3 of 3

selecting range from Activecell to last entry in the same row as active cell

  1. #1
    Registered User
    Join Date
    07-01-2013
    Location
    Canberra, Australia
    MS-Off Ver
    Excel 2007
    Posts
    37

    selecting range from Activecell to last entry in the same row as active cell

    Hi Everyone,

    I'm hoping someone can help me correct my code. I have got stuck on one piece of my code and having trouble fixing... Overall I am trying to find variable station name in cell L2 of Sheet 2 in Sheet 1 and then select and copy the data from the data in "cell L2 of Sheet 2" to the last entry of that row. I have attached an example test spreadsheet of the data and a macro is within Sheet 1 called test1. Please note that cell L2 in Sheet 2 will always be different station name and the station list in Sheet 1 will change with differing station name.

    The code I am using is:

    Please Login or Register  to view this content.
    The code that is not working and bringing up an error is:

    Please Login or Register  to view this content.
    Any help would be greatly appreciated. Thanks so much.

    Cheers,
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    12-10-2006
    Location
    Sydney
    MS-Off Ver
    Office 365
    Posts
    3,525

    Re: selecting range from Activecell to last entry in the same row as active cell

    Hi lbesley,

    I'd do it this way where you can use the rngMyRange range variable as you like (I've just returned its address into a message box):

    Please Login or Register  to view this content.
    Regards,

    Robert
    ____________________________________________
    Please ensure you mark your thread as Solved once it is. Click here to see how
    If this post helps, please don't forget to say thanks by clicking the star icon in the bottom left-hand corner of my post

  3. #3
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,587

    Re: selecting range from Activecell to last entry in the same row as active cell

    PL change the code as,
    Please Login or Register  to view this content.

+ 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. Selecting Activecell and cell next to the Activecell
    By Raghukumarn in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-31-2013, 06:32 AM
  2. Selecting Range from Active Cell to Last Row with data in same column
    By bs04do in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-23-2013, 10:59 AM
  3. [SOLVED] How to select cell to the right of active cell without selecting the activecell aswell?
    By Emmaly in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-12-2012, 07:22 AM
  4. Selecting Range next to ActiveCell
    By ChrisF79 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-07-2008, 02:28 PM
  5. Replies: 1
    Last Post: 07-31-2006, 07:33 AM

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