+ Reply to Thread
Results 1 to 7 of 7

Thread: Counting a List of Strings

  1. #1
    Registered User
    Join Date
    11-28-2011
    Location
    Mississippi
    MS-Off Ver
    Excel 2010
    Posts
    3

    Counting a List of Strings

    If I have a list of cities:

    Atlanta
    San Diego
    Detroit
    Atlanta
    New York
    Kansas City
    New York
    Atlanta
    Detorit
    Atlanta
    ...
    Is there a way for Excel to show me how many times a city appears in a list? The list is long and contains a lot of cities so I don't think I can say IF="Atlanta" Think of 100 different cities and many I have never heard of before.
    The result should look similar to this:

    Atlanta 4
    San Diego 1
    Detroit 2
    New York 2
    Kansas City 1

    Thanks for anyone's help on this

    bhova

  2. #2
    Valued Forum Contributor
    Join Date
    12-14-2009
    Location
    San Francisco, CA
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    986

    Re: Counting a List of Strings

    Use Pivot Table to get the unique value, then use countif
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    11-28-2011
    Location
    Mississippi
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Counting a List of Strings

    Wow, that is exactly what I want.
    How to I find Pivot Strings? Ha

    Thanks,

    bhova

  4. #4
    Valued Forum Contributor
    Join Date
    12-14-2009
    Location
    San Francisco, CA
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    986

    Re: Counting a List of Strings

    What do you mean?

  5. #5
    Valued Forum Contributor
    Join Date
    12-14-2009
    Location
    San Francisco, CA
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    986

    Re: Counting a List of Strings

    If you just want the unique values, highlight column A, go to Insert > Pivot Table > Drag cities to row labels field.

  6. #6
    Registered User
    Join Date
    11-28-2011
    Location
    Mississippi
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Counting a List of Strings

    I've never used that function. I see that it is more complicated then just typing in a formula. But I think I figured it out. thanks so much for your help.

    Much appreciated. You made my day a whole lot better

    bhova

  7. #7
    Forum Contributor
    Join Date
    02-22-2011
    Location
    Rhône Alpes, France
    MS-Off Ver
    Excel 2007
    Posts
    154

    Re: Counting a List of Strings

    Hi,
    Why don't you use all the capabilities of pivot table to get the result ?
    See attached file
    Best regards
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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.2.0