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

Hi Keith

Sorry, the formula should have been
=IF(SUMPRODUCT(($A$2:A2=A2)*($B$2:B2=B2))=1,1,"")
and copied down

The range grows as you copy down, as the second part of each range is
relative, and the first is absolute.

--
Regards

Roger Govier


"Keith" wrote in message
...
Hi Roger,

I tried your sugestion but it didn't work

21/05/07 Stoke on Trent 1
21/05/07 London
21/05/07 London
22/05/07 Birmingham 1

As you can see from the above example there are 4 visits here. Three
are on
the 21/05/07 and one on the 22/05/07.

The first and fourth lines are fine, but The two london entries sould
have
counted as 1 as well, since he went to London in the 21/05/07 as well
as
Stoke.


"Roger Govier" wrote:

Hi Keith

You could add another column to your source table called Count.
With Date of visit in column A, and Town in column B, then
in cell 2 of the new column enter
=IF(SUMPRODUCT(($A$2:$A1000=A2)*($B$2:$B1000=B2))= 1,1,"")
and copy down.
Add Count to the Data area of your PT, as Sum of Count.
--
Regards

Roger Govier


"Keith" wrote in message
...
I have a list of places our reps visit along with who they visited
and
various other things. I then bring this data into a pivot table.

I want to see a total of how many times they visited each Town, but
I
only
want the town counted once of any date, so if they visit London on
the
02/07/07 and went to 4 placed there will be 4 lines in the data but
the pivot
table only counts 1. But if they went to london on the 02/07/07
and
then
again on the 05/07/07 then the pivot table will count 2.

Anybody got any ideas how this can be none?






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 [email protected] Excel Discussion (Misc queries) 3 May 14th 07 06:46 PM
counting the # of unique values bobby769 Excel Worksheet Functions 3 January 10th 07 04:08 AM
Counting unique values giantwolf Excel Discussion (Misc queries) 4 August 28th 06 01:31 PM
Counting Unique Values RJL0323 Excel Worksheet Functions 27 February 19th 06 09:12 PM
Counting Unique Values carl Excel Worksheet Functions 9 July 25th 05 12:44 PM


All times are GMT +1. The time now is 03:50 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"