+ Reply to Thread
Results 1 to 8 of 8

Select from this cell. UP to A2.

  1. #1
    Registered User
    Join Date
    11-15-2013
    Location
    Newquay, Cornwall
    MS-Off Ver
    Excel 2010
    Posts
    67

    Select from this cell. UP to A2.

    I have been working on a sheet that is updated daily. The macro starts by copying the previous days info to a different sheet, and then bringing in the current days info.

    I am trying to copy a "Comments" column across from the previous day. I usually select the cell with the look up formula, copy, select the cell to the left (as that column is always full), Ctrl + Down, then use Activecell.Offset (0, 1), and then Ctrl + Shift + Up, paste to populate all the empty cells in the column.

    Only this time, the CTRL + Shift + Up is stopping at the first cell with an entry, and not going up to the top.

    Is there a way of telling it to go from the cell selected in the 'Activecell.Offset (0, 1)' line (which can vary greatly), up to cell A2, or A3 no matter what data is entered or not in the cells inbetween?

    Thanks.
    Still learning... one day I will be able to help!

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,463

    Re: Select from this cell. UP to A2.

    Assuming cell A17 is selected:

    Please Login or Register  to view this content.
    If B17 is selected:

    Please Login or Register  to view this content.

    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    11-15-2013
    Location
    Newquay, Cornwall
    MS-Off Ver
    Excel 2010
    Posts
    67

    Re: Select from this cell. UP to A2.

    Thanks for the reply. Not sure how I would incorporate that into the code I already have. Might have helped if I had put that up to start with

    Please Login or Register  to view this content.
    So it's the xlUp bit that I need to modify, so it goes to A2 instead of stopping at the first cell with data.

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,463

    Re: Select from this cell. UP to A2.

    Suggest you post a small sample workbook with a description of what you are trying to achieve ... not how you are trying to do it with code, just the end result. That is, this formula in these cells because ...

  5. #5
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,463

    Re: Select from this cell. UP to A2.

    Or try this:

    Please Login or Register  to view this content.

    Regards, TMS

  6. #6
    Registered User
    Join Date
    11-15-2013
    Location
    Newquay, Cornwall
    MS-Off Ver
    Excel 2010
    Posts
    67

    Re: Select from this cell. UP to A2.

    Please see file attached. I have deleted out all of the sensitive information. Hope it helps.
    Attached Files Attached Files

  7. #7
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,463

    Re: Select from this cell. UP to A2.

    Did you see post #5?

  8. #8
    Registered User
    Join Date
    11-15-2013
    Location
    Newquay, Cornwall
    MS-Off Ver
    Excel 2010
    Posts
    67

    Re: Select from this cell. UP to A2.

    Err, no, didn't refresh the page before replying. Will have a look now.

+ 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. Double Clicking Cell To Select Choice Data For Another Cell's Formula
    By Rondeez in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-03-2015, 09:53 AM
  2. [SOLVED] Select matching cell and insert value 4 cells to the left of selected cell?
    By TomToms in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-03-2014, 11:46 AM
  3. Macro to Find Matching text in a cell and select a specif cell
    By Carolynsdesk in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-20-2013, 07:28 AM
  4. Replies: 4
    Last Post: 06-17-2013, 05:21 AM
  5. Replies: 2
    Last Post: 12-09-2008, 12:44 AM
  6. Select Data from a cell, move down a number, select data
    By Kage_ in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 10-12-2007, 02:12 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