ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Help on Coumting Unique records (https://www.excelbanter.com/excel-programming/336858-help-coumting-unique-records.html)

joc

Help on Coumting Unique records
 
I have rows of data sometimes more than a few thousand.
"A" has a code designating a type of record - alpha or numeric
can have the same code eg HN in multiple records
"B" through "F" are data
"H" is a Ticket number - alpha numeric can have the same
ticket number multiple records

I have worked out how to obtain the COUNT of records with a particular
code "A" As well as the number of Unique tickets "H"

I can't seem to get the correct formula to give me UNIQUE records with
a particular "code" and "Ticket"

example of data and the result i am looking for:
CODE DATE STORE QTY Price Total Ticket
2 3/30/2005 2 15 2 30 164105
hn 3/30/2005 3 9.9 4 39.6 166207
hn 3/30/2005 4 15 2 30 166207
2 4/7/2005 5 9 4 36 167261
2 4/7/2005 7 5 2 10 167261
2 4/7/2005 6 15 2 30 167261
hn 8/1/2005 16 2 2 4 172170
hn 8/2/2005 10 5 2 10 172170


result neededed how many unique tickets are their for a particular
code:
4 'HN' records
4 Ticket #
or
5 '2' records
2 Ticket #
any help is most appreciated


Patrick Molloy[_2_]

Help on Coumting Unique records
 
use an array formula,
eg

{=SUM((B5:B12=K3)*(H5:H12=K4)*1)}

in the above, your table CODE is B5:B12, TICKET is H5:H12
K3 is the code I want to check and K4 is the ticket.
So if K3 has the value 2 and K3 has the value 164105, the the array returns
1, changing the value of K3 to 167261, the array returns 3

"joc" wrote:

I have rows of data sometimes more than a few thousand.
"A" has a code designating a type of record - alpha or numeric
can have the same code eg HN in multiple records
"B" through "F" are data
"H" is a Ticket number - alpha numeric can have the same
ticket number multiple records

I have worked out how to obtain the COUNT of records with a particular
code "A" As well as the number of Unique tickets "H"

I can't seem to get the correct formula to give me UNIQUE records with
a particular "code" and "Ticket"

example of data and the result i am looking for:
CODE DATE STORE QTY Price Total Ticket
2 3/30/2005 2 15 2 30 164105
hn 3/30/2005 3 9.9 4 39.6 166207
hn 3/30/2005 4 15 2 30 166207
2 4/7/2005 5 9 4 36 167261
2 4/7/2005 7 5 2 10 167261
2 4/7/2005 6 15 2 30 167261
hn 8/1/2005 16 2 2 4 172170
hn 8/2/2005 10 5 2 10 172170


result neededed how many unique tickets are their for a particular
code:
4 'HN' records
4 Ticket #
or
5 '2' records
2 Ticket #
any help is most appreciated




All times are GMT +1. The time now is 05:43 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com