Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 13
Default Counting unique values

Trying to count how many customers there were in 2006 only vs. 2007 only vs.
2006 & 2007.

Data's set up with Customer ID and Year columns, so if a customer is part of
both 2006 and 2007, then there would be two separate rows (one for each year).

Any suggestions?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,480
Default Counting unique values

Hi

=SUMPRODUCT(--(A1:A1000),--(B1:B1000) ) for 2006
=SUMPRODUCT(--(A1:A1000),--(C1:C1000)) for 2007
=SUMPRODUCT(--(A1:A1000),--(B1:B1000),--(C1:C1000)) for both years
--
Regards
Roger Govier

"blswes" wrote in message
...
Trying to count how many customers there were in 2006 only vs. 2007 only
vs.
2006 & 2007.

Data's set up with Customer ID and Year columns, so if a customer is part
of
both 2006 and 2007, then there would be two separate rows (one for each
year).

Any suggestions?


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 13
Default Counting unique values

I think I may have described the situation too vaguely.

In column A (let's say), I have Customer IDs. And in column B, I have Year
(either 2006 or 2007).

Therefore, a Customer ID that's in both 2006 and 2007 ends up with an entry
in two rows (one for 2006 and one for 2007).

How do I count how many Customer IDs show up for only 2006 vs. only 2007 vs.
both 2006 and 2007?

"Roger Govier" wrote:

Hi

=SUMPRODUCT(--(A1:A1000),--(B1:B1000) ) for 2006
=SUMPRODUCT(--(A1:A1000),--(C1:C1000)) for 2007
=SUMPRODUCT(--(A1:A1000),--(B1:B1000),--(C1:C1000)) for both years
--
Regards
Roger Govier

"blswes" wrote in message
...
Trying to count how many customers there were in 2006 only vs. 2007 only
vs.
2006 & 2007.

Data's set up with Customer ID and Year columns, so if a customer is part
of
both 2006 and 2007, then there would be two separate rows (one for each
year).

Any suggestions?


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,480
Default Counting unique values

Hi

Since the Year is held in column B, (I had thought one year was in B and 1
in C), then use
=SUMPRODUCT(--(A1:A1000),--(B1:B1000=2006) ) for 2006
=SUMPRODUCT(--(A1:A1000),--(B1:B1000)=2007 ) for 2007
=SUMPRODUCT(--(A1:A1000)*(B1:B1000=2006)+(B1:B1000=2007)) for 2006&2007
--
Regards
Roger Govier

"blswes" wrote in message
...
I think I may have described the situation too vaguely.

In column A (let's say), I have Customer IDs. And in column B, I have Year
(either 2006 or 2007).

Therefore, a Customer ID that's in both 2006 and 2007 ends up with an
entry
in two rows (one for 2006 and one for 2007).

How do I count how many Customer IDs show up for only 2006 vs. only 2007
vs.
both 2006 and 2007?

"Roger Govier" wrote:

Hi

=SUMPRODUCT(--(A1:A1000),--(B1:B1000) ) for 2006
=SUMPRODUCT(--(A1:A1000),--(C1:C1000)) for 2007
=SUMPRODUCT(--(A1:A1000),--(B1:B1000),--(C1:C1000)) for both years
--
Regards
Roger Govier

"blswes" wrote in message
...
Trying to count how many customers there were in 2006 only vs. 2007
only
vs.
2006 & 2007.

Data's set up with Customer ID and Year columns, so if a customer is
part
of
both 2006 and 2007, then there would be two separate rows (one for each
year).

Any suggestions?


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Counting unique values

On Aug 14, 9:30*am, blswes wrote:
Trying to count how many customers there were in 2006 only vs. 2007 only vs.
2006 & 2007.

Data's set up with Customer ID and Year columns, so if a customer is part of
both 2006 and 2007, then there would be two separate rows (one for each year).

Any suggestions?


Use the Count function

=COUNT(C1:C2) - based of a sort of 2006 C1:C2 = Cell Range
=COUNT(C1:C2) - based of a sort of 2007 C1:C2 = Cell Range
=COUNT(C1:C2) - based of a sort of 2006 & 2007 C1:C2 = Cell Range




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
Counting unique values in a row BASCRUMMY New Users to Excel 8 August 12th 08 06:29 PM
Counting unique values doofus1981 Excel Discussion (Misc queries) 7 April 3rd 08 01:56 PM
Counting Unique Values [email protected] Excel Discussion (Misc queries) 3 May 14th 07 06:46 PM
Counting Unique Values Bob Excel Worksheet Functions 38 November 1st 06 09:00 AM
Counting unique values giantwolf Excel Discussion (Misc queries) 4 August 28th 06 01:31 PM


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

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

About Us

"It's about Microsoft Excel"