+ Reply to Thread
Results 1 to 4 of 4

Change first row of last column

  1. #1
    Registered User
    Join Date
    06-13-2012
    Location
    Virginia
    MS-Off Ver
    Excel 2007
    Posts
    2

    Change first row of last column

    I started by using this code to copy a group of columns from one workbook to another. The columns should come from D-K on the source workbook and be inserted into the first empty columns in the target workbook.
    Please Login or Register  to view this content.
    The above code worked correctly, but I wanted all of the columns I copied to be shifted down 1 row, so I modified the code to be this, which is probably a little awkward, but it works.
    Please Login or Register  to view this content.
    Now, all of those new columns I created have the first row empty, and I am trying to figure out how to put data into those specific cells. My goal is for the first row of these newly created columns to contain the date, as obtained from the filename of the source workbook. For now, I am trying to insert any data into these cells, but I cannot figure how to specify which cells I want.

    Any advice would be appreciated.

  2. #2
    Valued Forum Contributor
    Join Date
    08-29-2011
    Location
    Mississauga, CANADA
    MS-Off Ver
    Excel 2010
    Posts
    503

    Re: Change first row of last column

    use this code instead of all what you posted

    Please Login or Register  to view this content.
    Regards,
    Khaled Elshaer
    www.BIMcentre.com

    Remember To Do the Following....
    1. Thank those who have helped you by clicking the Star below their post.
    2. Mark your post SOLVED if it has been answered satisfactorily:
    • Select Thread Tools (on top of your 1st post)
    • Select Mark this thread as Solved

  3. #3
    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,697

    Re: Change first row of last column

    Maybe just:

    Please Login or Register  to view this content.

    Or maybe:

    Please Login or Register  to view this content.

    Having established the next "free" column, you can use that as the starting point for inserting data:

    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


  4. #4
    Registered User
    Join Date
    06-13-2012
    Location
    Virginia
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Change first row of last column

    I used your code Kelshaer:

    Please Login or Register  to view this content.
    This did exactly what I wanted. Thanks for your help.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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