+ Reply to Thread
Results 1 to 3 of 3

Counting Distinct Entries In A Range

  1. #1
    Registered User
    Join Date
    08-29-2013
    Location
    new york, new york
    MS-Off Ver
    Excel 2013
    Posts
    76

    Counting Distinct Entries In A Range

    If I have range of data made up of different states, how do I easily count how many different states are in that range?

    For Instance:

    NY
    PA
    NY
    NY
    VA
    NJ
    NJ
    IL

    What formula do I use so that it equals 5?

  2. #2
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,327

    Re: Counting Variables

    One way...

    =SUM(1/COUNTIF(A1:A8,A1:A8))

    IMPORTANT
    This is an array formula
    Enter the formula >> press F2 then >> CTRL + SHIFT + ENTER
    If entered correctly, the formula will be enclosed in {brackets}
    Do not enter the {brackets} manually
    HTH
    Regards, Jeff

  3. #3
    Registered User
    Join Date
    06-21-2012
    Location
    Surrey, England
    MS-Off Ver
    Excel 2007
    Posts
    19

    Re: Counting Distinct Entries In A Range

    Hi,

    If interested, here's another 'non-array' alternative approach (ie: you won't need to press CTRL+SHIFT+ENTER keys together to activate the formula to generate the desired result):

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

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 1
    Last Post: 03-21-2012, 07:06 PM
  2. Replies: 2
    Last Post: 10-05-2011, 12:30 PM
  3. Counting Distinct Entries To Unknown last row.
    By realniceguy5000 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-26-2011, 04:14 PM
  4. VBA counting used entries in a range
    By f_mayr in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-22-2009, 04:16 AM
  5. [SOLVED] Counting distinct entries based on meeting month &amp;amp; year criteria
    By jennifer in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-09-2006, 10:00 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1