Counting Data

  • Thread starter Thread starter Byron720
  • Start date Start date
B

Byron720

In a column I have hundreds of airway bills. I need to calculate how many
different numbers I have in that report. Not the total (I can go to the last
row for that) and not the frequency. For example:

9140266155
9182187486
9182187556
9182187556
9182187464
9182187464
9140266166
9140266166
9140266170
9140266170
9140266181

Here the formula here should give me 7 which is the number of different
AWB's there are.
 
=SUM(1/COUNTIF(A1:A11,A1:A11))


This is an array formula that must be entered with CNTRL-SHFT-ENTER rather
than just the ENTER key.

(If you enter it the wrong way you will get 1.)
 
From the XL help file "Count the number of unique values by using functions":

=SUM(IF(FREQUENCY(A2:A10,A2:A10)>0,1))
Note that this needs to be entered as an array (use Ctrl+Shift+Enter)
 
In a column I have hundreds of airway bills.

The following formulas are SLOW to calculate if you had 1000's of rows of
data.

If there are no empty cells within the range:

=SUMPRODUCT(1/COUNTIF(A1:A11,A1:A11))

If there might be empty cells within the range:

=SUMPRODUCT((A1:A11<>"")/COUNTIF(A1:A11,A1:A11&""))
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top