View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bernie Deitrick Bernie Deitrick is offline
external usenet poster
 
Posts: 5,441
Default Count my Customers

Dave,

To count unique customers, array enter (enter using Ctrl-Shift-Enter) a formula like

=SUM(1/COUNTIF(L2:L1000,L2:L000))

To count unique customers for a transaction period, you could use a helper column, say M, where you
enter the period of interest in M1 (matching how the entry is made in column C), and in M2, enter
the formula

=IF(C2=$M$1,1/SUMPRODUCT(($C$2:$C$1000=$M$1)*($L$2:$L$1000=L2)), 0)

and copy down. Then use

=SUM(M2:M1000)

to give the count of unique customers for that period.

--
HTH,
Bernie
MS Excel MVP


"DaveMoore" wrote in message
...
Hi.
I use my spreadsheet as a database containing some 15,000
transactions.
The fields include Customer No. in column 'L' and a Period field in
column 'C'. The Customer No. may be alphabetical, numeric or
alphanumeric. The period is the year. An individual customer may
have anything from 1 to 50 transactions in the database which is
sorted by Customer No. With this forums help I have successfully
counted the number of transactions by period, and totalled the value
by period.

I would now like to count the total number of different customers I
have within the database and also in a transaction period.

Can anyone help?

Regards,
Dave Moore