+ Reply to Thread
Results 1 to 5 of 5

Count unique occurrences of text and show result for each in separate columns

  1. #1
    Registered User
    Join Date
    07-18-2011
    Location
    Austin, TX
    MS-Off Ver
    Excel 2007
    Posts
    13

    Count unique occurrences of text and show result for each in separate columns

    I have five columns of text containing state abbreviations. I need to count the number of times (out of 5) each abbreviation occurs in the row and show the result for each state in a separate column (i.e. State 1, State 2, State 3,...). Any help will be greatly appreciated. I have attached an example and included a list of the state abbreviations.
    Attached Files Attached Files
    Last edited by areynolds; 07-20-2011 at 09:27 AM.

  2. #2
    Registered User
    Join Date
    07-18-2011
    Location
    DC, US
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: Count unique occurrences of text and show result for each in separate columns

    Do you mean this?
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    07-18-2011
    Location
    Austin, TX
    MS-Off Ver
    Excel 2007
    Posts
    13

    Re: Count unique occurrences of text and show result for each in separate columns

    Not quite. I need it to count just across rows. Each row is a different person and I need to know how many days out of the five that they were in a particular state. Thank you for the effort!

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Count unique occurrences of text and show result for each in separate columns

    Try:

    =LARGE(INDEX(COUNTIF($A2:$E2,$K$3:$K$52),0),COLUMNS($A$1:A$1))

    copied across the 5 columns and down the list

    To hide the 0's select the resultant range and format the cells as custom: 0;-0;;@
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  5. #5
    Registered User
    Join Date
    07-18-2011
    Location
    Austin, TX
    MS-Off Ver
    Excel 2007
    Posts
    13

    Re: Count unique occurrences of text and show result for each in separate columns

    That is exactly it! Thank you so much!!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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