+ Reply to Thread
Results 1 to 15 of 15

Macro for a Summary of multiple worksheets

  1. #1
    Registered User
    Join Date
    02-06-2014
    Location
    United States
    MS-Off Ver
    Excel 2013
    Posts
    12

    Macro for a Summary of multiple worksheets

    Hey Everyone,

    I am familiar with the basics of Excel, but not with Macros or VBA's.
    I am trying to create one Excel file for accounting purposes. Within this file I want to create a worksheet for each customer I have in my store. On this sheet I want to list my costs and their payments. I would like to then create a summary sheet which adds all of the individual customer sheets together. Now this is easy to do manually, but what I need to create is an automation (Macro I assume) that does the following:
    I add a new sheet and name it after the new customer. The Macro automatically adds that sheet into the formula for the summary sheet. This way may secretary only needs to activate the macro, which will copy a sheet and automatically update the summary page to include this newly copied sheet and all its information. Now the process for automating projected costs and profits is very easy and requires nothing more but to activate the macro.

    Any help would be appreciated. I couldn't get it to work.

  2. #2
    Registered User
    Join Date
    02-06-2014
    Location
    United States
    MS-Off Ver
    Excel 2013
    Posts
    12

    Re: Macro for a Summary of multiple worksheets

    Here is another way of explaining it, maybe my first post was too vague.

    I have an accounting Excel file. This file will have a sheet for each customer my business has. Each sheet (for each customer one), will list all his payments and all my costs and then totals them on the bottom of the sheet. Now I will create one sheet like this for every customer I have. Another sheet I have is a summary sheet where all the costs and payments of all customers are totaled together to give me various statistics for projecting profits and costs from all customers. Now I can manually program a SUM in the summary sheet and reference each individual sheet. But what I would need is the following: I need a Macro that will automatically reference a newly created sheet (customer) in the SUM of the summary sheet so that if I have a new customer all I need to do is copy the last customer sheet, change the data on it, run the macro (wherever that would be necessary) and the summary sheet automatically accepts it.

    How is that possible?

  3. #3
    Valued Forum Contributor
    Join Date
    01-19-2010
    Location
    Melbourne Australia
    MS-Off Ver
    latest is Excel 2016. have older versions
    Posts
    624

    Re: Macro for a Summary of multiple worksheets

    Hello stylist and welcome to the forums

    as a new member you may not have seen the many requests to new posters, please attach a sample workbook with your input data and exactly what you expect clearly shown .

    most of us here are volunteers so anything that makes it easy for us to help you will increase your chances of a quick response and often, a spreadsheet back with the solution included for you to copy into your real workbook. (most of us will struggle with the need to create a workbook that matches yours so that we can test any code, so maybe we just pass the thread

    To post a file, use the "Go Advanced" button in the lower right corner of the posting screen

    jmac1947

  4. #4
    Registered User
    Join Date
    02-06-2014
    Location
    United States
    MS-Off Ver
    Excel 2013
    Posts
    12

    Re: Macro for a Summary of multiple worksheets

    Here is a file attached of the exact sheet I need macroed.
    Attached Files Attached Files

  5. #5
    Valued Forum Contributor
    Join Date
    01-19-2010
    Location
    Melbourne Australia
    MS-Off Ver
    latest is Excel 2016. have older versions
    Posts
    624

    Re: Macro for a Summary of multiple worksheets

    stylist,

    what is max likely number of sale to a single customer likely to be?
    do they tend to buy in different categories at a single sale?
    do they buy multiple types in a single category or are you simply capturing he total of say three "packages" as one line item in the customer worksheet?

    Just a couple of scope questions as I think how to build a useful solution?

    jmac

  6. #6
    Forum Contributor
    Join Date
    01-30-2011
    Location
    Vancouver, Canada
    MS-Off Ver
    Excel 2010
    Posts
    604

    Re: Macro for a Summary of multiple worksheets

    This copies all the customer data to the summary page.


    Please Login or Register  to view this content.
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    02-06-2014
    Location
    United States
    MS-Off Ver
    Excel 2013
    Posts
    12

    Re: Macro for a Summary of multiple worksheets

    Hey guys,
    Thank you for the responses.

    Each table ie. Packages & Labs & payments etc are on a monthly basis. So they themselves will never exceed more than 10. The summary chart now reflects the totals and then does the quarterly and annual projections. This is manually designed already as you can see. I now need the macro to automatically add any sheet that gets copied from the existing one into the formulas of the summary sheet, so that I don't have to manually add all of them, as my secretary will be doing it and she doesn't know how to do it.

  8. #8
    Valued Forum Contributor bulina2k's Avatar
    Join Date
    11-20-2012
    Location
    Urziceni, Ialomita, Romania
    MS-Off Ver
    2019 and 365
    Posts
    861

    Re: Macro for a Summary of multiple worksheets

    Hi stylist!

    The code is to be executed every time you activate the Summary sheet.
    Check the attach.

    For everyone's information, I used:
    Please Login or Register  to view this content.

    Mark the thread as SOLVED if you consider.
    Attached Files Attached Files
    .. and don't forget to have fun!
    Bogdan.

    mark SOLVED and Add Reputation if my answer pleases you

  9. #9
    Registered User
    Join Date
    02-06-2014
    Location
    United States
    MS-Off Ver
    Excel 2013
    Posts
    12

    Re: Macro for a Summary of multiple worksheets

    How do I activate the worksheet?
    Pardon my ignorance on the subject matter, but I couldn't test it because I didn't know how to activate it.

  10. #10
    Valued Forum Contributor bulina2k's Avatar
    Join Date
    11-20-2012
    Location
    Urziceni, Ialomita, Romania
    MS-Off Ver
    2019 and 365
    Posts
    861

    Re: Macro for a Summary of multiple worksheets

    You activate it every time you enter that worksheet.

  11. #11
    Registered User
    Join Date
    02-06-2014
    Location
    United States
    MS-Off Ver
    Excel 2013
    Posts
    12

    Re: Macro for a Summary of multiple worksheets

    If that is the case, then the code provided above does not work unfortunately.
    I added a sheet and filled out some arbitrary numbers and then saved and even closed the excel file and reopened it again, but no calculations were done on the summary sheet. Currently it doesn't even update the existing sheets.

  12. #12
    Registered User
    Join Date
    02-06-2014
    Location
    United States
    MS-Off Ver
    Excel 2013
    Posts
    12

    Re: Macro for a Summary of multiple worksheets

    Attached sheet from above
    Attached Files Attached Files

  13. #13
    Valued Forum Contributor bulina2k's Avatar
    Join Date
    11-20-2012
    Location
    Urziceni, Ialomita, Romania
    MS-Off Ver
    2019 and 365
    Posts
    861

    Re: Macro for a Summary of multiple worksheets

    Hi again!

    Copy my code from post #8 and paste it into 'Summary' sheet code. (Right click down on sheet name and choose 'view code') Paste and save.

  14. #14
    Registered User
    Join Date
    02-06-2014
    Location
    United States
    MS-Off Ver
    Excel 2013
    Posts
    12

    Re: Macro for a Summary of multiple worksheets

    Hey bulina2k,
    Thank you very much. It seems to work perfectly.
    Can I add infinite amounts of sheets to this file?

  15. #15
    Valued Forum Contributor bulina2k's Avatar
    Join Date
    11-20-2012
    Location
    Urziceni, Ialomita, Romania
    MS-Off Ver
    2019 and 365
    Posts
    861

    Re: Macro for a Summary of multiple worksheets

    Yes, as long as they are similar. (Totals in the same cells)
    Mark thread as SOLVED and add rep if you consider.

+ 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 to Pull Data from multiple worksheets onto a summary sheet based on an ID
    By eswonson in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-04-2013, 03:31 PM
  2. [SOLVED] Problem with macro to copy certain data from multiple worksheets into a summary worksheet
    By niftysquirrel in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 06-14-2013, 03:35 PM
  3. Copying multiple cells from multiple worksheets to one summary sheet
    By Dragothemensch in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-18-2013, 08:39 PM
  4. Replies: 3
    Last Post: 01-05-2013, 02:20 AM
  5. Macro to copy rows from multiple worksheets to summary sheet
    By zmbd in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-10-2011, 10:21 AM

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