+ Reply to Thread
Results 1 to 14 of 14

Need Help with Macro - copy and paste

  1. #1
    Registered User
    Join Date
    03-20-2012
    Location
    la
    MS-Off Ver
    Excel 2007
    Posts
    12

    Need Help with Macro - copy and paste

    Hello and thank you in advance
    I need help with getting columns F and G copy pasted to col A and C to get a new starting point
    Attached are my displaced cols

    Thanks
    Fcorp
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    03-23-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    1,093

    Re: Need Help with Macro - copy and paste

    Hello fcorp,

    Are you trying to copy the values of column F & G from Sheet1 and paste them into the first empty row in sheet2 columns A & C? Or are you pasting them into sheet1 columns A & C

    Thanks

    Rvasquez

  3. #3
    Registered User
    Join Date
    03-20-2012
    Location
    la
    MS-Off Ver
    Excel 2007
    Posts
    12

    Re: Need Help with Macro - copy and paste

    Hello Rvasquez

    I am trying to paste into Sheet 1 Columns A & C

    Thank you in advance for your help

    Fcorp

  4. #4
    Forum Contributor
    Join Date
    11-02-2011
    Location
    Rugby, England
    MS-Off Ver
    Office 365
    Posts
    846

    Re: Need Help with Macro - copy and paste

    Hi, are you simply trying to paste what is in F&G over what is in A&C?
    Or will you be continually adding information?
    galvinpaddy
    Last edited by galvinpaddy; 04-11-2012 at 04:30 PM.

  5. #5
    Registered User
    Join Date
    03-20-2012
    Location
    la
    MS-Off Ver
    Excel 2007
    Posts
    12

    Re: Need Help with Macro - copy and paste

    Hi Galvinpaddy
    I am trying to copy F&G into A&C. Then create a new F&G by putting information into D&E. This will continue numerous times each time I have a new D&E to add

    Thanks in advance for the help

    Fcorp

  6. #6
    Forum Contributor
    Join Date
    11-02-2011
    Location
    Rugby, England
    MS-Off Ver
    Office 365
    Posts
    846

    Re: Need Help with Macro - copy and paste

    Ok, thanks for that.
    Next question - Will there only ever be 1 line of info to copy & paste at one time?
    And, will the info you copy from F&G be replaced each time, or will you keep a record of the info? eg - first time its done, info is pasted into A3&C3, the next time, is the info to be pasted into A3&C3 again, or A4&C4?
    Last edited by galvinpaddy; 04-11-2012 at 05:05 PM.

  7. #7
    Valued Forum Contributor
    Join Date
    03-23-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    1,093

    Re: Need Help with Macro - copy and paste

    Hello fcorp,

    Couldn't you just set the 2nd row in column A = the previous row column F and 2nd row in column C = the previous row column G?

    For Example:

    F1 = A1+D1
    G1 = C1+E1
    A2 = F1
    C2= G1

    Sorry if I'm not understanding your question correctly.

    Thanks!

    RVASQUEZ

  8. #8
    Registered User
    Join Date
    03-20-2012
    Location
    la
    MS-Off Ver
    Excel 2007
    Posts
    12

    Re: Need Help with Macro - copy and paste

    Hi RVASQUEZ

    I will think about your solution. my actual file is 80 rows of similar type and numerous iterations of D & E is required

    I hope I explained it

  9. #9
    Registered User
    Join Date
    03-20-2012
    Location
    la
    MS-Off Ver
    Excel 2007
    Posts
    12

    Re: Need Help with Macro - copy and paste

    Hi Galvinpaddy

    There are 80 rows of such data and calculations
    I will need to record each time F&G is changed.

    Appreciate the help

  10. #10
    Forum Contributor
    Join Date
    11-02-2011
    Location
    Rugby, England
    MS-Off Ver
    Office 365
    Posts
    846

    Re: Need Help with Macro - copy and paste

    ok, in order for anyone to give you an accurate result, you may need to load a sample sheet, showing what cells contain info and where you want the record of data copied to be stored etc.
    Its very difficult to guess your project, obviously if you load a sheet please substitute all sensitive info with made up stuff
    Either way, try the attached, this is working with one line of info only until i have more details.
    It will copy info from the cells in yellow, paste it first (values only) into the record tab, insert a new line (to keep most recent change on top) then go back to Data tab and paste values into A,B,C4.
    Is this what you are after? (to start with at least)
    galvinpaddy.
    Attached Files Attached Files
    Last edited by galvinpaddy; 04-11-2012 at 06:51 PM. Reason: Added sheet with updated VBA

  11. #11
    Registered User
    Join Date
    03-20-2012
    Location
    la
    MS-Off Ver
    Excel 2007
    Posts
    12

    Re: Need Help with Macro - copy and paste

    Galvinpaddy

    The macro you sent works but as you rightly said its best to load a sheet much similar to what I have. I am attaching the same.
    What I currently do is that each time I make a change in K & L I save it as a different file. The changes to K & L each time feed from a different file.
    I manually copy data from M & N and put it into I and J and then relink k & L to get my new M & N totals.
    If I can run a macro to
    1. M & N into a Record area to the right depending on the Data in N2. So the right columns with be
    Original Hours Original Dollars Mod 1 Hours Mod 1 Dollars Mod 2 Hours Mod 2 Dollars
    and so on
    2. Copy M & N into I & J before I start work on my new K & L

    I hope I explained it Ok.
    Please ask questions if still unclear.
    Appreciate all your help
    Attached Files Attached Files

  12. #12
    Forum Contributor
    Join Date
    11-02-2011
    Location
    Rugby, England
    MS-Off Ver
    Office 365
    Posts
    846

    Re: Need Help with Macro - copy and paste

    Hi, thanks for that, now if you could explain a little more for me.
    The sheet you have loaded shows what you work with, can you reload it with what you want the results to be? (obviously manually entered info) and i will work on the code for you today.
    galvinpaddy

  13. #13
    Registered User
    Join Date
    03-20-2012
    Location
    la
    MS-Off Ver
    Excel 2007
    Posts
    12

    Re: Need Help with Macro - copy and paste

    Hi Galvinpaddy
    Thank you!
    Attached Files Attached Files

  14. #14
    Registered User
    Join Date
    03-20-2012
    Location
    la
    MS-Off Ver
    Excel 2007
    Posts
    12

    Re: Need Help with Macro - copy and paste

    Still looking for help on this one, anyone, please!

+ 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