count function

A

AJ Patel

I am trying to come up with a formula that will look at column, look for a
word or set of words, and give me a running total in another column. For
example, use the following worksheet
A B C D
1 Ball Ball 2
2 Bat Bat 1
3 Ball Glove 1
4 Glove

In cell D1 I want a running total of all instances of Ball from Row A,
similarly in cell d2 I want a running total of all instances of Bat from Row
A, and so on.
 
A

AJ Patel

Correction to my original post, below is what I am actually looking for

I am trying to come up with a formula that will look at a column for a word
or set of words, look at a 2nd column and if and give me a running total in
another column as long as none of the values in the 2nd column match. For
example, use the following worksheet
A B C D
1 Ball 1 Ball 2
2 Bat 2 Bat 1
3 Ball 3 Glove 1
4 Ball 3
5 Glove 4
for Cell D1 I want the countif function to look at column A for Ball give me
a running total as long as the numbers in column B match, so in this case you
can see that cell B3 and B4 both have 3, so I only need that counted once for
cell d1 therefore my running total would be 2. I hope I explained what I
need clearly
 
G

Gary''s Student

Use a Pivot Table. Given a list in a column, it can list each item uniquely
and the number of items the item occurs in the list. For example:

animal
fish
dog
mouse
dog
fish
fish
cat
fish
dog
fish
cat


will produce:

Count of animal
animal Total
cat 2
dog 3
fish 5
mouse 1
Grand Total 11
 
A

AJ Patel

I actually need it to look at another column before giving me a total for
example using your data if all the animals are written in column A, I need a
running total as long as the values in column B are unique
A B Result
mouse 1 mouse = 2
fish 2 fish = 4
dog 3 dog = 3
mouse 4 cat = 2
dog 5
fish 6
fish 6
cat 7
fish 8
dog 9
fish 10
cat 11

As you see in column A fish shows 5 times however in column B there are two
instances that 6 shows, so I want to disregard that 2nd fish in my running
total and any further instances of fish that has 6 in column B
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top