+ Reply to Thread
Results 1 to 10 of 10

Problem with macro to automate copying data from one column to another.

  1. #1
    Forum Contributor
    Join Date
    05-01-2014
    Location
    RIX
    MS-Off Ver
    Excel 2003; 2007
    Posts
    114

    Problem with macro to automate copying data from one column to another.

    Hello!

    I'm handling huge information blocks (schedules, tables etc.)

    Unfortunately I've encountered an issue concerning manual copying data from one column to onother.

    Would you please be so kind as to help me with an advice -

    how to automate copying the values from column A to B,

    at that moment, when any value of column "A'' changes.

    Consequently when any of column's "A" values changes, all the "A" column's values are copied to column "B"

    There should be only values pasted in column "B", without any interrelation.

    I've attached a xlsx file with more detailed description.

    I'll really appreciate your cooperation
    Attached Files Attached Files
    Last edited by Arty_1; 05-05-2014 at 09:58 AM.
    Regards

    Arty

  2. #2
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Problem with macro to automate copying data from one column to another.

    The code resides in sheet1 and fires on by changing any value in column A.
    Attached Files Attached Files

  3. #3
    Forum Contributor
    Join Date
    05-01-2014
    Location
    RIX
    MS-Off Ver
    Excel 2003; 2007
    Posts
    114

    Re: Problem with macro to automate copying data from one column to another.

    Thanks a lot!

    It's working great!

    Unfortunately I cannot find any code in macros options (I'd like to copy it to another worksheet),

    could you please send it?

  4. #4
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Problem with macro to automate copying data from one column to another.

    The code is on sheet1. The code should not reside on module. Right click on sheet1, then view code, copy the code and paste in to sheet where you are making and copying changes.

  5. #5
    Valued Forum Contributor
    Join Date
    07-04-2012
    Location
    Cape Town, RSA
    MS-Off Ver
    Office 365 ProPlus
    Posts
    1,050

    Re: Problem with macro to automate copying data from one column to another.

    Hi,

    Here is AB33's macro:
    Please Login or Register  to view this content.
    Note that it is an event macro, so you must follow these instructions to paste it properly.

    1. Copy the macro above
    2. Open the workbook where you need the macro
    3. Right click on the sheet tab in which the macro must run
    4. Choose View Code
    5. When the VBA editor opens, right click on the module and paste.
    6. Close the VBA editor

    The macro should now run for this sheet too...
    Regards,
    Rudi

  6. #6
    Forum Contributor
    Join Date
    05-01-2014
    Location
    RIX
    MS-Off Ver
    Excel 2003; 2007
    Posts
    114

    Re: Problem with macro to automate copying data from one column to another.

    Glad to see You, Rudi!

    It's working excellent!

    Thank you for the detailed explanation!
    Last edited by Arty_1; 05-05-2014 at 11:50 AM.

  7. #7
    Forum Contributor
    Join Date
    05-01-2014
    Location
    RIX
    MS-Off Ver
    Excel 2003; 2007
    Posts
    114

    Re: Problem with macro to automate copying data from one column to another.

    Two more additional questions:

    How do I edit the code if:

    1. The copied range is going to be the whole column "F" which is going to pasted in the column "G"

    2. The the copied range is going to be "F2-F50" which is going to pasted in the range "G2-G50"

  8. #8
    Valued Forum Contributor
    Join Date
    07-04-2012
    Location
    Cape Town, RSA
    MS-Off Ver
    Office 365 ProPlus
    Posts
    1,050

    Re: Problem with macro to automate copying data from one column to another.

    Hi,

    Using AB33's code as a base, you can change it as follows:

    For 1. The copied range is going to be the whole column "F" which is going to pasted in the column "G"
    Please Login or Register  to view this content.
    And for 2. The the copied range is going to be "F2-F50" which is going to pasted in the range "G2-G50":

    Please Login or Register  to view this content.

  9. #9
    Forum Contributor
    Join Date
    05-01-2014
    Location
    RIX
    MS-Off Ver
    Excel 2003; 2007
    Posts
    114

    Re: Problem with macro to automate copying data from one column to another.

    I wish I had the knowledge You have, Rudi!

    Macro it's working excellent!

    Thank you!

  10. #10
    Valued Forum Contributor
    Join Date
    07-04-2012
    Location
    Cape Town, RSA
    MS-Off Ver
    Office 365 ProPlus
    Posts
    1,050

    Re: Problem with macro to automate copying data from one column to another.

    I had little to do with this one. AB33 did all the work.
    Glad it is working for you though. That's the whole reason for this forum...to help others to be more productive.

    Cheers
    TX AB33. (From me too!)

+ 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] Macro to make copying cells automate,- an appeal for expert's advice!
    By Arty_1 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 05-04-2014, 07:22 AM
  2. Replies: 2
    Last Post: 04-11-2014, 12:18 PM
  3. Replies: 3
    Last Post: 08-16-2012, 09:38 AM
  4. automate the copying of data between 2 excel sheets?
    By Gradje34 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-07-2012, 05:28 AM
  5. Macro problem - copying existing formula down column
    By JerryMcFarts in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 12-22-2008, 10:47 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