excel formula

G

ghcajo

can a formula be made to do the following:
if a line item has the same name in column C then add 1 to column B
i.e.
the count column is generated depending on the name field
date count name address
oct-1 1 bob 123 first st
oct 1 1 john 789 ave a
oct 5 1 ed 456 main st
oct 3 2 bob 123 first st
oct 2 1 bill 81 second st
oct 2 3 bob 123 first st
 
J

Jacob Skaria

Try the below formula in B2 and copy down as required
=COUNTIF(C$2:C2,C2)

'OR to handle blanks try the below
=IF(C2<>"",COUNTIF(C$2:C2,C2),"")

If this post helps click Yes
 
G

ghcajo

Jacob Skaria said:
Try the below formula in B2 and copy down as required
=COUNTIF(C$2:C2,C2)

'OR to handle blanks try the below
=IF(C2<>"",COUNTIF(C$2:C2,C2),"")

If this post helps click Yes

ALL THE COLUMN B CAME OUT TO 1,
I need it to add 1 if it was already listed.
See bob has 3 entries.
 
J

Jacob Skaria

Did you try the formula?

Copy paste the formula to cell B2 and copy down as required..

Try and feedback

If this post helps click Yes
 
G

ghcajo

Jacob Skaria said:
Did you try the formula?

Copy paste the formula to cell B2 and copy down as required..

Try and feedback

If this post helps click Yes


I just noticed that at the end of the formula the } is missing. I tried to
redo it and it will not show up.
If I look at the function argument the totals are right.
 
G

ghcajo

ghcajo said:
I just noticed that at the end of the formula the } is missing. I tried to
redo it and it will not show up.
If I look at the function argument the totals are right.


I saved the file. then reloaded it and the counts were correct.
THANKS
 

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