• Macro? Auto summarize data (2003)

    Author
    Topic
    #452874

    I’m attaching a file to show you what I need help with. We have data dumped to a spreadsheet every month or so from a database query. The data lists each dept’s actual budget numbers in one long table. Our director wants the data summarized in separate tables for each department. At first, I thought of subtotals. But she wants the labor numbers first with the type of labor split (regular, Other and OT), then the total labor, then the Direct and Materials line items. I can’t see how to break down subtotals the way she wants it to show.

    I thought about trying Vlookup, but either that won’t work, or I’m just not clever enough to figure out how to use it for this example.

    How can I get the data to summarize in the required format? I am totally code illiterate. I can copy/paste if someone has the code for this somewhere.

    Would you mind, please, looking at the attached file and telling me how to set this up for her – keeping in mind that the data will be updated each month and there may be additional lines added to some of the departments each month.

    Thank you for any help you can provide.

    Viewing 1 reply thread
    Author
    Replies
    • #1119245

      Since the data come from a database, I’d ask the person(s) responsible for the database to design a report in the database. That should be easier than trying to do it in Excel.

      • #1119246

        I agree. But that’s not an option. I already asked that question. Long winded reply that amounted to “No.”

        • #1119247

          How should the output be organized?

          One table with a dropdown to select the department?

          A series of tables below one another in one worksheet?

          A separate worksheet for each department?

          Or something else (if so, how)?

          • #1119250

            The director said she wants a series of tables below one another in one worksheet.

            • #1119252

              See the attached version. I’ve added a command button (from the Forms toolbar) that starts the macro.
              The macro code in the Visual Basic Editor has been commented extensively.

    • #1119513

      An other formula way,

      Please select the department code number from the B3 dropdown list

      Regards
      Bosco

      • #1119560

        Your formulas work well, but MelanieB stated “The director said she wants a series of tables below one another in one worksheet.”

    Viewing 1 reply thread
    Reply To: Macro? Auto summarize data (2003)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: