+ Reply to Thread
Results 1 to 5 of 5

Copy data from all but a few worksheets into a summary sheet based on condition

  1. #1
    Registered User
    Join Date
    05-27-2013
    Location
    Sweden
    MS-Off Ver
    Excel 2010
    Posts
    5

    Copy data from all but a few worksheets into a summary sheet based on condition

    Hi experts!
    Desperate for help as I don't even know where to start on this one..

    I have a workbook containing 4 fixed sheets - 'Faktura', 'Oversikt', 'Start' & 'End'. On one of the sheets there is a button letting users create new sheets (via a user form) between the 'Start' and 'End' worksheets. The user-created worksheets will all have a date in cell F6 and two numbers in cells F37 & F40. There will be an ever-growing number of sheets. On the 'Oversikt' sheet in column G (G1 to G12) there are the names of the months.


    What I would like to do is this:

    - Sum cell F40 on all worksheets except the 4 fixed sheets - based on the condition (date) in cell F6. I need to summarize & "categorize" these by month on the sheet 'Oversikt' in cells G1 to G12. So if there are three sheets with different dates in cell F6 between 'Start' & 'End' - for example Sheet1 has 2012-06-01 in F6, Sheet2 has 2012-06-13 in F6 and Sheet3 has 2013-01-01 in F6 - I want the sum of cell F40 on Sheet1 and Sheet2 to go in cell F6 (G6 holds "June") on the sheet 'Oversikt 'and the sum of cell F40 on Sheet3 to go in cell F1 (G1 holds "January") on the sheet 'Oversikt'.

    This macro would preferably update dynamically with the adding and removing of sheets but if thats to complicated then perhaps it could be assigned to a button. Also, each time the macro runs it would need to delete the previous values in cells F1-F12 so as to avoid duplicate values..

    Any help would be very much appreciated!
    Last edited by d_kjellin; 06-03-2013 at 12:54 AM.

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Copy data from all but a few worksheets into a summary sheet based on condition

    Do you have a sample file that you can upload?

    To Attach a File:

    1. Click on Go Advanced
    2. In the frame Attach Files you will see the button Manage Attachments
    3. Click the button.
    4. A new window will open titled Manage Attachments - Excel Forum.
    5. Click the Browse... button to locate your file for uploading.
    6. This will open a new window File Upload.
    7. Once you have located the file to upload click the Open button. This window will close.
    8. You are now back in the Manage Attachments - Excel Forum window.
    9. Click the Upload button and wait until the file has uploaded.
    10. Close the window and then click Submit.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  3. #3
    Registered User
    Join Date
    05-27-2013
    Location
    Sweden
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Copy data from all but a few worksheets into a summary sheet based on condition

    Yeah sure, attachment below.

    Fakturera.xlsm

  4. #4
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Copy data from all but a few worksheets into a summary sheet based on condition

    Are there chances of sheets which are created between "Start" and "End" to be deleted as well or only added?

  5. #5
    Registered User
    Join Date
    05-27-2013
    Location
    Sweden
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Copy data from all but a few worksheets into a summary sheet based on condition

    There is a possibility that sheets may be deleted yes..

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

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