+ Reply to Thread
Results 1 to 18 of 18

Macro button to copy data from one sheet to another sheet's next available column

  1. #1
    Forum Contributor Alice21's Avatar
    Join Date
    04-22-2010
    Location
    Wales, United Kingdom
    MS-Off Ver
    Excel 2007
    Posts
    173

    Macro button to copy data from one sheet to another sheet's next available column

    Hi

    I have a live system collating data in a sheet called 'Live Data'. Staff enter data into this sheet every day and at the bottom of the sheet there is a summary of Counts etc.

    I need to be able to see what the figures are on a day by day basis so I'd like a macro button on my new sheet called 'Daily Data' that copys the summary cell contents off the 'Live Data' sheet and pastes them with the date into the 'Daily Data' sheet. I'd like to use this button at the end of every day and paste the data to the next available column so i have a running log for every day.

    It's s imple request and I've searched for Macro's but cannot find one that meets my needs.

    Help???

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

    Re: Macro button to copy data from one sheet to another sheet's next available column

    Alice,
    Can not see the sheet layout, please attach a sample.

  3. #3
    Forum Contributor Alice21's Avatar
    Join Date
    04-22-2010
    Location
    Wales, United Kingdom
    MS-Off Ver
    Excel 2007
    Posts
    173

    Re: Macro button to copy data from one sheet to another sheet's next available column

    Quote Originally Posted by AB33 View Post
    Alice,
    Can not see the sheet layout, please attach a sample.
    It may take a while as it's quite large and is full of confidential information...

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

    Re: Macro button to copy data from one sheet to another sheet's next available column

    Please remove confidential information, just need a sample which mimics the layout of your sheet

  5. #5
    Forum Contributor Alice21's Avatar
    Join Date
    04-22-2010
    Location
    Wales, United Kingdom
    MS-Off Ver
    Excel 2007
    Posts
    173

    Re: Macro button to copy data from one sheet to another sheet's next available column

    Quote Originally Posted by AB33 View Post
    Please remove confidential information, just need a sample which mimics the layout of your sheet
    I have just tried and it's giving me all sorts of errors messages and recovering my workbook. It won't let me save it once I have blanked it out. Sorry, I'm not having the best dau with this PC! Bare with me....

  6. #6
    Forum Contributor Alice21's Avatar
    Join Date
    04-22-2010
    Location
    Wales, United Kingdom
    MS-Off Ver
    Excel 2007
    Posts
    173

    Re: Macro button to copy data from one sheet to another sheet's next available column

    Hi

    Here is a basic version of what I have. I want to copy the totals in Sheet1 into the next available column on the Daily Data sheet.
    Hope that makes sense.
    Attached Files Attached Files

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

    Re: Macro button to copy data from one sheet to another sheet's next available column

    Alice,
    Both sheet appear to be the same.
    Sheet1 row 17 has a total row, where is this row copied in sheet daily? Is on the same site name, next column D, or any next column?

  8. #8
    Forum Contributor Alice21's Avatar
    Join Date
    04-22-2010
    Location
    Wales, United Kingdom
    MS-Off Ver
    Excel 2007
    Posts
    173

    Re: Macro button to copy data from one sheet to another sheet's next available column

    Sheet 1 is a pivot table fed off a live system and will change daily. At the end of each day i want to copy column C from Sheet1 and paste it into the Daily Daily tab to the next available column..Id like a macro button to do this for me as i will be handing the maintenance of this over to someone who is less IT literate.

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

    Re: Macro button to copy data from one sheet to another sheet's next available column

    Alice,

    Daily Daily tab to the next available column.
    You have two totals and one subtotal in sheet. When you say, next column, is it just next column, or you first need to match site and paste it in to next site column?

  10. #10
    Forum Contributor Alice21's Avatar
    Join Date
    04-22-2010
    Location
    Wales, United Kingdom
    MS-Off Ver
    Excel 2007
    Posts
    173

    Re: Macro button to copy data from one sheet to another sheet's next available column

    I'm not quite following.
    Tomorrow I will manually have to copy the whole of column C from Sheet1 into the Daily Data tab next to the column that says 23/10/13..and call the new data 24/10/13. I will do this every day so I will then have data records for every day.

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

    Re: Macro button to copy data from one sheet to another sheet's next available column

    Well,
    When you see the attached (It is wrong),you will see the issues I am struggling to understand. I know you want to copy in to next empty column, but which row?
    Attached Files Attached Files

  12. #12
    Forum Contributor Alice21's Avatar
    Join Date
    04-22-2010
    Location
    Wales, United Kingdom
    MS-Off Ver
    Excel 2007
    Posts
    173

    Re: Macro button to copy data from one sheet to another sheet's next available column

    I want all the rows copied over if possible.
    Would it be better to just insert a lookup formula every day?

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

    Re: Macro button to copy data from one sheet to another sheet's next available column

    Alice,
    I can only suggest a solution if I understand your request. That is the reason for attaching a desired result, so that we do not have to read OP's intention. You have the same input and output data, so I do not know what the output sheet looks like.
    Now, you want to copy all rows. Which row and where? Is it an entire row 12?

  14. #14
    Forum Contributor Alice21's Avatar
    Join Date
    04-22-2010
    Location
    Wales, United Kingdom
    MS-Off Ver
    Excel 2007
    Posts
    173

    Re: Macro button to copy data from one sheet to another sheet's next available column

    Here is an illustrated copy of what I require
    Attached Files Attached Files

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

    Re: Macro button to copy data from one sheet to another sheet's next available column

    Is it always fixed column C and want to copy in to next empty column? Try the attached.
    Attached Files Attached Files

  16. #16
    Forum Contributor Alice21's Avatar
    Join Date
    04-22-2010
    Location
    Wales, United Kingdom
    MS-Off Ver
    Excel 2007
    Posts
    173

    Re: Macro button to copy data from one sheet to another sheet's next available column

    That is what I want yes (obviously the data will be different daily) The Macro buttons don't work though. Could you send me the code?

  17. #17
    Forum Contributor Alice21's Avatar
    Join Date
    04-22-2010
    Location
    Wales, United Kingdom
    MS-Off Ver
    Excel 2007
    Posts
    173

    Re: Macro button to copy data from one sheet to another sheet's next available column

    Quote Originally Posted by Alice21 View Post
    That is what I want yes (obviously the data will be different daily) The Macro buttons don't work though. Could you send me the code?
    It's OK, i found the code!

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

    Re: Macro button to copy data from one sheet to another sheet's next available column

    Attached code to the button
    Attached Files Attached Files

+ 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: 03-13-2013, 03:14 PM
  2. Replies: 16
    Last Post: 01-20-2013, 09:40 AM
  3. [SOLVED] Macro to Copy Data from one Sheet A to Sheet B based on value in cell on sheet A
    By scass in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-11-2012, 07:21 PM
  4. Replies: 2
    Last Post: 03-14-2012, 03:26 AM
  5. Copy column data on one sheet to row or column date on another sheet based on user in
    By soready42012 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-08-2012, 12:03 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