+ Reply to Thread
Results 1 to 15 of 15

Easiest way to Copy/Paste data from Recurring Form to an Historical Data Sheet

  1. #1
    Registered User
    Join Date
    10-14-2010
    Location
    Minnesota
    MS-Off Ver
    Excel 2003
    Posts
    23

    Easiest way to Copy/Paste data from Recurring Form to an Historical Data Sheet

    I have a standard form that is filled out by users. Currently, this info is taken and manually copied and pasted cell by cell (roughly 20 different cells) into an historical agenda spreadsheet which has a different layout and structure than the standard form. What is the best way to go about automating this process so I can merely click a button and run a macro to do this? Currently I repeat the manual copy/paste process for about 30 forms each week. Please let me know if you need any more information.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Easiest way to Copy/Paste data from Recurring Form to an Historical Data Sheet

    1) Fill out the form.
    2) Turn on the Macro > Recorder
    3) Go through all the steps to manually copy the values to your database and reset the form for next use
    4) Turn off the recorder
    5) Paste the resulting code here and we'll help you streamline it into a dynamic macro
    (remember to use code tags)
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    10-14-2010
    Location
    Minnesota
    MS-Off Ver
    Excel 2003
    Posts
    23

    Re: Easiest way to Copy/Paste data from Recurring Form to an Historical Data Sheet

    There is confidential information in here so I just deleted all of it and used some dummy data for a couple of the cells and figure I can repeat based on the copy/paste macro for those two that you provide. Also keep in mind that each form will be named something different (edited by the user, I have no control over this) and some of the cells are merged together (do they need to be unmerged before copy/pasting?) Code below:

    Please Login or Register  to view this content.

    'Opened blank Sheet(Book1) to record this macro

    Please Login or Register  to view this content.


    'Copied second data cell from Example Form and pasted in Historical Data

    Please Login or Register  to view this content.


    'Saved Historical Data and closed that sheet

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by willy91785; 10-14-2010 at 05:15 PM. Reason: Updated with Code Tags

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Easiest way to Copy/Paste data from Recurring Form to an Historical Data Sheet

    Please edit the post above and add the code tags as reminded.

  5. #5
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Easiest way to Copy/Paste data from Recurring Form to an Historical Data Sheet

    This should do it. Just expand the 'etc... part:

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by JBeaucaire; 10-14-2010 at 05:48 PM.

  6. #6
    astrodon
    Guest

    Re: Easiest way to Copy/Paste data from Recurring Form to an Historical Data Sheet

    I have an Addin which among other things, opens a form. On this form is a list box that gets populated from a sql server database based on user choices. The form works precisely the way expected no problems. However, I would like to know how to be able to use right click Copy item from this list box.

    Is that possible?

    TIA

  7. #7
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Easiest way to Copy/Paste data from Recurring Form to an Historical Data Sheet

    It's possible you're trying to hijack someone else's thread with a your own questions.

    Be sure to read through the Forum Rules so you can use and follow them effectively.

    Then post your own thread with your own proper title and your own attached sample workbooks New thread get the most new attention, too.

  8. #8
    astrodon
    Guest

    Re: Easiest way to Copy/Paste data from Recurring Form to an Historical Data Sheet

    Jeesssh. How could it be hijacking the thread when my question is about the same damn thing?!

    You know I have been involved with things like this since they were called bulletin boards and never have I had the problems from legalistic jerks that I have had on this one. Perhaps you should just remove me from this rag!

  9. #9
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Easiest way to Copy/Paste data from Recurring Form to an Historical Data Sheet

    Quote Originally Posted by astrodon View Post
    Jeesssh. How could it be hijacking the thread when my question is about the same damn thing?!

    You know I have been involved with things like this since they were called bulletin boards and never have I had the problems from legalistic jerks that I have had on this one. Perhaps you should just remove me from this rag!
    Then use a different forum, as requested you are banned
    Last edited by royUK; 10-15-2010 at 02:19 AM.
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  10. #10
    Registered User
    Join Date
    10-14-2010
    Location
    Minnesota
    MS-Off Ver
    Excel 2003
    Posts
    23

    Re: Easiest way to Copy/Paste data from Recurring Form to an Historical Data Sheet

    Thank you for your help. One last thing that would make my life easier: Can you add code that will open up one worksheet in a folder (say, 'H:\Governance'), do the copy/paste exercise, and close (no need to reset form values), then open the next sheet in the folder and repeat, until all sheets have been copied to the Historical Agenda? Once again, thanks for the help.

  11. #11
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Easiest way to Copy/Paste data from Recurring Form to an Historical Data Sheet

    Let's see you get your hands dirty now.

    'WORKBOOKS TO 1 SHEET
    I have a macro for collecting data from all files in a specific folder.Normally this macro just copies a whole sheet into the master database. The section marked This is the section to customize is where your current copy/paste commands would need to go instead of what is there now.

    Give it a crack. No it's not easy if you've never done it before, but doing it (or trying to) will force you to learn more about macros, which is a good thing and the point of the forum.

  12. #12
    Registered User
    Join Date
    10-14-2010
    Location
    Minnesota
    MS-Off Ver
    Excel 2003
    Posts
    23

    Re: Easiest way to Copy/Paste data from Recurring Form to an Historical Data Sheet

    Thank you, I will work on this and let you know if I come across any problem. Can I ask you an unrelated question since you seem knowledgeable? I am running Excel 2003 at work unfortunately and am running into issues with the 32,000 data point limit on graphs. I have more data points than that -- do you know of any fixes to include all the data?

  13. #13
    Registered User
    Join Date
    10-14-2010
    Location
    Minnesota
    MS-Off Ver
    Excel 2003
    Posts
    23

    Re: Easiest way to Copy/Paste data from Recurring Form to an Historical Data Sheet

    I just noticed that it was a coincidence that the two cells being copied (A4 and C4) were the same on both sheets. This will not be the case in reality. Does there need to be any update to the code?

  14. #14
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Easiest way to Copy/Paste data from Recurring Form to an Historical Data Sheet

    Quote Originally Posted by willy91785 View Post
    Thank you, I will work on this and let you know if I come across any problem. Can I ask you an unrelated question since you seem knowledgeable? I am running Excel 2003 at work unfortunately and am running into issues with the 32,000 data point limit on graphs. I have more data points than that -- do you know of any fixes to include all the data?

    Post new questions into new threads. New threads garner the most attention.

  15. #15
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Easiest way to Copy/Paste data from Recurring Form to an Historical Data Sheet

    Quote Originally Posted by willy91785 View Post
    I just noticed that it was a coincidence that the two cells being copied (A4 and C4) were the same on both sheets. This will not be the case in reality. Does there need to be any update to the code?
    You have to finish writing the code first, I just gave you the first two examples.
    Please Login or Register  to view this content.

+ 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