A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Count occurences and return total



 
 
Thread Tools Display Modes
  #1  
Old October 20th, 2007, 07:01 AM posted to microsoft.public.excel.worksheet.functions
Daniel A.
external usenet poster
 
Posts: 3
Default Count occurences and return total

HELP! I know someone here can help me! I want to count the number of times
a specific ID number occurs in a column, and return the total count in the
cell adjacent to each occurrence of that number:

ID # Combined Count
343 1
654 3
654 3
654 3
109 2
109 2
433 1

If anyone can advise, I would greatly appreciate it! THANKS!@
  #2  
Old October 20th, 2007, 07:19 AM posted to microsoft.public.excel.worksheet.functions
Daniel A.[_2_]
external usenet poster
 
Posts: 3
Default Count occurences and return total

NEVER MIND! I figured it out myself (after MUCH trial and error). Here it is:

=COUNTIF(A:A,A2)

Thanks anyway!

"Daniel A." wrote:

HELP! I know someone here can help me! I want to count the number of times
a specific ID number occurs in a column, and return the total count in the
cell adjacent to each occurrence of that number:

ID # Combined Count
343 1
654 3
654 3
654 3
109 2
109 2
433 1

If anyone can advise, I would greatly appreciate it! THANKS!@

  #3  
Old October 20th, 2007, 07:29 AM posted to microsoft.public.excel.worksheet.functions
T. Valko
external usenet poster
 
Posts: 15,759
Default Count occurences and return total

Try one of these:

With ID #'s starting in cell A2, enter this formula in cell B2 and copy down
as needed:

=COUNTIF(A:A,A2)

If the ID #'s are grouped together as in your sample then this is a little
bit better. A1 and B1 are column headers.

Entered in B2 and copied down as needed:

=IF(A2=A1,B1,COUNTIF(A:A,A2))

Using this formula saves from doing a count on every entry and just does a
count on each distinct entry.

--
Biff
Microsoft Excel MVP


"Daniel A." Daniel wrote in message
...
HELP! I know someone here can help me! I want to count the number of
times
a specific ID number occurs in a column, and return the total count in the
cell adjacent to each occurrence of that number:

ID # Combined Count
343 1
654 3
654 3
654 3
109 2
109 2
433 1

If anyone can advise, I would greatly appreciate it! THANKS!@



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 04:36 AM.


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