Summarizing number of guest per table

  • Hi Guys,


    I've upcoming event and the list of guests:


    What I'm trying is to build a function that summarizing number of person per each table.. Please your kind help with that.
    [TABLE="border: 1, cellpadding: 1, width: 500"]

    [tr]


    [td]

    Guest Name

    [/td]


    [td]

    Table Number

    [/td]


    [/tr]


    [tr]


    [td]

    A

    [/td]


    [td]

    1

    [/td]


    [/tr]


    [tr]


    [td]

    B

    [/td]


    [td]

    4

    [/td]


    [/tr]


    [tr]


    [td]

    C

    [/td]


    [td]

    1

    [/td]


    [/tr]


    [tr]


    [td]

    D

    [/td]


    [td]

    1

    [/td]


    [/tr]


    [tr]


    [td]

    E

    [/td]


    [td]

    3

    [/td]


    [/tr]


    [tr]


    [td]

    F

    [/td]


    [td]

    4

    [/td]


    [/tr]


    [tr]


    [td]

    G

    [/td]


    [td]

    2

    [/td]


    [/tr]


    [tr]


    [td]

    H

    [/td]


    [td]

    2

    [/td]


    [/tr]


    [/TABLE]
    [TABLE="border: 1, cellpadding: 1, width: 500"]

    [tr]


    [td]

    Table Number

    [/td]


    [td]

    1

    [/td]


    [td]

    2

    [/td]


    [td]

    3

    [/td]


    [td]

    4

    [/td]


    [/tr]


    [tr]


    [td]

    Number of persons

    [/td]


    [td]

    ?

    [/td]


    [td]

    ?

    [/td]


    [td]

    ?

    [/td]


    [td]

    ?

    [/td]


    [/tr]


    [/TABLE]

  • Try COUNTIF()


    .e.g Assuming your table is in A1:B9 and your table numbers to count are in B10:E10, then


    =COUNTIF(B2:B9,B10) copied across

    Where there is a will there are many ways. Finding one that works for you is the challenge!

  • Thanks,


    This helps if comes one person only, however I'm managing a row of the entire family.
    Instead of counting I wish to sum "number of persons" data that located in "C" column. What's the right syntax of that?
    Something with "offset", I assume?

  • I am not sure what you mean....


    My formula will give you a result of 3 for table 1 since guest A, C and D are at Table 1.


    Is that not what you are looking for?

    Where there is a will there are many ways. Finding one that works for you is the challenge!

  • You would use similar function... SUMIF()


    e.g.


    =SUMIF($B$2:$B$9,1,$C$2:$C$9)


    you can replace the 1 with a cell reference containing the table number 1.

    Where there is a will there are many ways. Finding one that works for you is the challenge!

Participate now!

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