+ Reply to Thread
Results 1 to 2 of 2

Thread: Determine Majority in Row of 5 Cells or Count Unique Values

  1. #1
    Registered User
    Join Date
    06-18-2010
    Location
    Seattle, WA
    MS-Off Ver
    Excel 2003
    Posts
    1

    Determine Majority in Row of 5 Cells or Count Unique Values

    I'm hoping someone can help me with a challenging equation / macro. I need to compare text in a row of 5 cells to determine if 3 of the 5 cells contain the same text. While each row will only contain 5 cells, I will need to run the equation / macro on upwards of 10,000 row. It would be great if the majority answer was copied to an empty cell at the end of each row.

    I'm an intermediate Excel user that hasn't played with macros. However, I can follow instructions very well.

    Thanks in advance for you help.

    Andy

  2. #2
    Forum Guru NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    32,636

    Re: Determine Majority in Row of 5 Cells or Count Unique Values

    Say your range is A1:E1, try:

    =COUNTIF(A1:E1,INDEX(A1:E1,MODE(MATCH(A1:E1,A1:E1,0))))>=3

    this returns true, if at least 3 cells are the same.
    Microsoft MVP - Excel

    Where there is a will there are many ways. Pick One!


    Please read the Forum Rules

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

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

    Preferred Charities: Lupus Canada and Sick Kids Foundation.
    Feel Free to Donate if you want to, for the assistance you received today.

+ 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