View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Jacob Skaria Jacob Skaria is offline
external usenet poster
 
Posts: 8,520
Default Counting the number of different entries in a column

With the query area code in cell C1 enter the below formula. Please note that
this is an array formula. You create array formulas in the same way that you
create other formulas, except you press CTRL+SHIFT+ENTER to enter the
formula. If successful in 'Formula Bar' you can notice the curly braces at
both ends like "{=<formula}"

=SUM(IF(FREQUENCY(IF(A1:A100=C1,MATCH(B1:B100,B1:B 100,0)),
ROW(B1:B100)-ROW(A1)+1),1))

--
Jacob


"Wombat" wrote:

Right!

column A contains area codes (two digit numbers, eg. 30), column B customer
numbers (eg 999999)

The lists then go down listing orders. I want to count how many different
customers have placed an order per area (not counting duplicates)

Thanks for any help