Copy a frequently changing column to different columns each time

  • [INDENT]Hi all,


    I have read a lot of the earlier posts in this website and have found it remarkably helpful. I was wondering if I could get some help here. I am absolutely new to Macros. I know Excel pretty well.


    I have been assigned to evaluate a weekly trend of arrears. Unfortunately, the system in my company does not keep any past data. I have made an excel sheet based on simple formulas and all the calculations form a part of one column (lets say Column A). So with every week, the data in column A changes.


    I wanted to use macros where the end-user has to click a button called copy and the data is copied to another column (Say Column C) on another worksheet (Say Sheet2). After one week, when the revised calculations are made, the end-user clicks on copy once again and the new values in Column A are copied to COLUMN D and not column C on sheet2. This keeps happening as a weekly thing.


    Help will be much appreciated.


    Regards,
    Kay [/INDENT]

  • Re: Copy a frequently changing column to different columns each time


    the example goes like this:


    Column A: Data which keeps on changing
    1
    2
    3
    4
    5
    6


    Column C Column D
    1
    2
    3
    4
    5
    6


    I want the macros to automatically copy + paste it to column C first and then the next time it changes to Column D and then the next time it changes to column E and so on....


    Sorry if the example was too general.


    Regards
    Kay

  • Re: Copy a frequently changing column to different columns each time


    Dear Emmy,


    Thanks for the quick response. However, I was trying to use it. Unfortunately, it does not paste anything after column D. So when I click "Copy". It pastes on column C and does it again on D but, it stops after D.


    Any way that could be changed.


    Thanks once agian for your help
    Kay

  • Re: Copy a frequently changing column to different columns each time


    How do you mean? When I click the button a third time I get data in Column E. What version of Excel are you using?

  • Re: Copy a frequently changing column to different columns each time


    Its 2007. I am sorry I think I might have disabled the macro content. Thanks for your help Emmy

  • Re: Copy a frequently changing column to different columns each time


    I'm using Excel 2003 so I imagine that's the problem. Can you try saving it as a macro enabled workbook?

  • Re: Copy a frequently changing column to different columns each time


    To paste the data from sourceRange to an open column in Sheet2.


    Code
    Sheets("Sheet2").Cells(1, Columns.Count).End(xlToLeft).Offset(0, 1).Resize(sourceRange.Rows.Count,SourceRange.Columns.Count).Value = sourceRange.Value

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!