+ Reply to Thread
Results 1 to 4 of 4

Copying WB1 to WB2 then deleting uneeded Data?

  1. #1
    Registered User
    Join Date
    06-06-2014
    Posts
    3

    Copying WB1 to WB2 then deleting uneeded Data?

    First thank you in advance for your generosity in sharing your insight and collective wisdom. as a relative newbie these forums have been a godsend!


    here is my project:

    I created a workbook to to document service provision across several categories. this work book will be delivered to multiple contractors, who will use it to document monthly service delivery. Data will be stored cumulatively in the workbook over the course of the fiscal year. Each Service delivery category has a command button through which a multipage userform is used to collect necessary data. Upon completing the user form the data is submitted and transferred to one of 13 worksheets in the work book. this all works great. but what I would also like to do is write a macro through which monthly data reports could be written to a separate workbook which can then be sent to me by the contractor. I was thinking that the easiest way to do that would be to copy entire worksheets to a new workbook (which would ultimately be named and saved by the contractor) and then delete all the entries that do not correspond to the month being reported. (I figured this approach would be an easy way to retain all the column headings etc.) I envisioned this process being initiated using a command button that would prompt the user to enter the month for which they wanted to run a report, then any rows (in any of the worksheets copied) that did not contain that month would be deleted after the worksheets were copied to a new work book.


    So my questions are:
    1. Does that strategy make sense?
    2. Can someone point me in the direction of how I can copy WS2-11 of the open workbook into a new WB2.
    I assume I would need to set each worksheet separately, or can I set a worksheet array (I don't know if that is the right term to use- range?)
    3. How would I delete the rows that do not represent services provided for the month in question?

    The workbook is rather large due to the many userforms and macros so I didn't attach it, but I below is a sample of the coding for data transfer from the userform to the worksheet so you can get a feel for the level of (in)expertise I have with this


    Please Login or Register  to view this content.


    thank you so much!!!!
    Last edited by alansidman; 06-10-2014 at 06:33 PM. Reason: code tags added

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2504 Win 11
    Posts
    24,704

    Re: Copying WB1 to WB2 then deleting uneeded Data?

    Code Tags Added
    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between
    Please Login or Register  to view this content.
    tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found at http://www.excelforum.com/forum-rule...rum-rules.html



    (Because you are new to the forum, I have added them for you today. Please take a few minutes to read all Forum Rules and comply in the future.)
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Registered User
    Join Date
    06-06-2014
    Posts
    3

    Re: Copying WB1 to WB2 then deleting uneeded Data?

    my sincerest apologies, and thank you for fixing my blunder and pointing me to the forum rules!
    Once again, I am thoroughly appreciative of any help with this project. While I think I could work out A solution to this problem, it is unlikely that it will be THE MOST CONCISE solution....

    thanks again!

  4. #4
    Registered User
    Join Date
    06-06-2014
    Posts
    3

    Re: Copying WB1 to WB2 then deleting uneeded Data?

    Please disregard this post. will post again separately when I have better clarity and more progress toward this goal.

    thank you all!

+ 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. Macro for copying data from one workbook to another and deleting
    By harishb63 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-04-2013, 11:53 AM
  2. Copying (but not deleting) data from a master sheet to multiple worksheets based on Col A
    By SmartBalance in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-06-2013, 03:09 PM
  3. Paste Formats causes uneeded recalc
    By eshadd in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-23-2012, 07:02 AM
  4. copying new data on a w'sheet without deleting historical data, and recalculating
    By Pasha81 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-19-2009, 04:47 AM
  5. Deleting rows after copying data
    By Chimelle in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-01-2005, 10:06 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