#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default excel formula

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

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,520
Default excel formula

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
---------------
Jacob Skaria


"ghcajo" wrote:

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

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default excel formula



"Jacob Skaria" wrote:

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
---------------
Jacob Skaria


"ghcajo" wrote:

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


ALL THE COLUMN B CAME OUT TO 1,
I need it to add 1 if it was already listed.
See bob has 3 entries.
  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,520
Default excel formula

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
---------------
Jacob Skaria


"ghcajo" wrote:



"Jacob Skaria" wrote:

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
---------------
Jacob Skaria


"ghcajo" wrote:

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


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

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default excel formula



"Jacob Skaria" wrote:

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
---------------
Jacob Skaria


"ghcajo" wrote:



"Jacob Skaria" wrote:

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
---------------
Jacob Skaria


"ghcajo" wrote:

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


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



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.


  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default excel formula



"ghcajo" wrote:



"Jacob Skaria" wrote:

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
---------------
Jacob Skaria


"ghcajo" wrote:



"Jacob Skaria" wrote:

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
---------------
Jacob Skaria


"ghcajo" wrote:

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


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



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
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel 2002 Formula: Urgent Conditional Formula Required Right Away - if possible blue[_2_] Excel Discussion (Misc queries) 2 July 11th 07 06:08 PM
Build excel formula using field values as text in the formula val kilbane Excel Worksheet Functions 2 April 18th 07 01:52 PM
Excel Formula Doesn't Execute (Shows formula-not the calcuation) Keys1970 Excel Discussion (Misc queries) 4 November 15th 06 02:12 PM
Excel 2002 formula displayed not value formula option not checked Dean Excel Worksheet Functions 1 February 28th 06 02:31 PM
Converting an Excel formula to an Access query formula Adam Excel Discussion (Misc queries) 1 December 15th 04 03:38 AM


All times are GMT +1. The time now is 07:20 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"