+ Reply to Thread
Results 1 to 5 of 5

Copying a column from one sheet to another dynamically

  1. #1
    Registered User
    Join Date
    05-06-2015
    Location
    Wales
    MS-Off Ver
    2010
    Posts
    13

    Copying a column from one sheet to another dynamically

    Hi, so i have working code which will copy column A from one sheet to column B on another sheet.

    The VBA is the following

    Please Login or Register  to view this content.
    However the range "A3:A100" needs to be updated to pick up the correct column from another sheet.

    I have EXCEL code for this,

    Please Login or Register  to view this content.
    This will return the letter A. Is there any way to incorporate this into the VBA script, on this line?

    Please Login or Register  to view this content.
    In order the make sure the range A3:A100 uses the correct column.

    Thanks in advance


    Book1.xlsm
    Last edited by craig159753; 06-02-2015 at 05:58 AM.

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Copying a column from one sheet to another dynamically

    Hi,

    With stuff like this I prefer to use a variable that identiofies the column offset from A and then use


    Formula: copy to clipboard
    Please Login or Register  to view this content.


    and I usually use a helper cell in the worksheet to work out the column offset required and read that into the VBA
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Registered User
    Join Date
    05-06-2015
    Location
    Wales
    MS-Off Ver
    2010
    Posts
    13

    Re: Copying a column from one sheet to another dynamically

    Im not sure how i can incorporate this in my VBA script. Thanks for the reply though

  4. #4
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Copying a column from one sheet to another dynamically

    Quote Originally Posted by craig159753 View Post
    Im not sure how i can incorporate this in my VBA script. Thanks for the reply though
    Upload the workbook and give us some examples of what you would do and what result you would expect and no doubt we can help further.

  5. #5
    Registered User
    Join Date
    05-06-2015
    Location
    Wales
    MS-Off Ver
    2010
    Posts
    13

    Re: Copying a column from one sheet to another dynamically

    done press cntrl + shift + c on sheet1 to see what it does

+ 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. Replies: 0
    Last Post: 06-22-2014, 04:18 PM
  2. [SOLVED] Macro for copying data from one column in sheet 2 based on two criterias in sheet 1
    By baardings in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-13-2012, 01:50 PM
  3. [SOLVED] copying specific certain column data based on cell/column value to another sheet
    By arctic7 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-09-2012, 03:38 PM
  4. Replies: 1
    Last Post: 06-17-2011, 04:18 PM
  5. Copying dynamically from one sheet to another without blanks
    By fynn in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-06-2008, 01:16 AM

Tags for this Thread

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