Advice on Creating a Table from a Userform

  • I have a table of raw data that shows by function and type the number of people required for each month of the year until Jan 19. An example of this 'Raw Data Table' is shown below. (The Rows A to C and Columns 1 to 7 are just there for a reference)...
    [TABLE="border: 0, cellpadding: 0, cellspacing: 0, width: 409"]

    [tr]


    [td][/td]


    [td]

    A

    [/td]


    [td]

    B

    [/td]


    [td]

    C

    [/td]


    [/tr]


    [tr]


    [TD="align: right"]1[/TD]

    [td]

    Function

    [/td]


    [td]

    Type

    [/td]


    [td]

    Jan-18

    [/td]


    [/tr]


    [tr]


    [TD="align: right"]2[/TD]

    [td]

    Speciality

    [/td]


    [td]

    Baker

    [/td]


    [TD="align: right"]1[/TD]

    [/tr]


    [tr]


    [TD="align: right"]3[/TD]

    [td]

    Speciality

    [/td]


    [td]

    Butcher

    [/td]


    [TD="align: right"]2[/TD]

    [/tr]


    [tr]


    [TD="align: right"]4[/TD]

    [td]

    Speciality

    [/td]


    [td]

    Cheesemonger

    [/td]


    [TD="align: right"]1[/TD]

    [/tr]


    [tr]


    [TD="align: right"]5[/TD]

    [td]

    Grocery

    [/td]


    [td]

    Packer

    [/td]


    [TD="align: right"]5[/TD]

    [/tr]


    [tr]


    [TD="align: right"]6[/TD]

    [td]

    Grocery

    [/td]


    [td]

    Helper

    [/td]


    [TD="align: right"]6[/TD]

    [/tr]


    [tr]


    [TD="align: right"]7[/TD]

    [td]

    Grocery

    [/td]


    [td]

    Driver

    [/td]


    [TD="align: right"]2[/TD]

    [/tr]


    [/TABLE]

    At the moment, if I wanted to create a summary table that summarises the total # of bakers and cheesemongers, and the total # of drivers, I have to do that manually....
    [TABLE="border: 0, cellpadding: 0, cellspacing: 0, width: 404"]

    [tr]


    [td]

    Function

    [/td]


    [td]

    Type

    [/td]


    [td]

    Jan-18

    [/td]


    [/tr]


    [tr]


    [td]

    Speciality

    [/td]


    [td]

    Baker, Cheesemonger

    [/td]


    [td]

    =C2+C3

    [/td]


    [/tr]


    [tr]


    [td]

    Grocery

    [/td]


    [td]

    Driver

    [/td]


    [td]

    =C7

    [/td]


    [/tr]


    [/TABLE]

    I thought there could be a way that I could create this summary table by using a user form. So, the user would select which function they were interested in, and then the type of people in that function they wanted to summarize. The Marco would then find their selection, the corresponding data, and add them together.


    Ideally, I would like a user to be able to create any summary table they want by using the userform instead of manually creating one!


    Eventually, it would 'print' out the table on the active spreadsheet. This should print in a specified location (eg, starting in Column A, Row 35).


    Any advice on where I could begin code wise? I'm fairly new to VBA so not really sure how I could go about doing something like this.....

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!