# Formula for totaling occurrences in a specified range

G

#### Guest

I run a doggie daycare, boarding & grooming facility. I keep tabs of each
dayâ€™s activities for each dog. For example, on 4/1/07 Fido comes in for
daycare (D), gets a pedicure (P), and is fed (F). Spot comes in for a bath
(S) and board (B). I have dates running across the top (columns) and dogs
running down the left (rows). Each day I run a total of all the Dâ€™s, Pâ€™s,
Bâ€™s, etc. Formula: â€œ=SUM(COUNTIF(B2:B8,â€=*B*â€))
Iâ€™m not sure thatâ€™s the right way to do the formula, but itâ€™s working.
At the end of the month I want to run a total on all of the services Fido
received. My question is, how do I write that formula? Using the formula
above and changing the cell IDâ€™s didnâ€™t work.

Hi

You can shorten your first formula to

=countif(B2:B8,"B")
or
=countif(b2:b8,A1) where A1 is a cell containing your criteria.

Assuming the dogs name is is column B the above should work, changing "b" to
the dogs name or A1 to the dog.

Also you may be intrested in creating a pivot table report, you will find
analysing the info more simpler, without formula, and more feature rich.

HTH