+ Reply to Thread
Results 1 to 6 of 6

Need to show text value of highest recurring text based on another text value

  1. #1
    Registered User
    Join Date
    10-23-2017
    Location
    In My Office
    MS-Off Ver
    2013
    Posts
    3

    Need to show text value of highest recurring text based on another text value

    Hi there,
    I have 2 columns,
    personsname and country , what im want to do is show the highest frequency of country per person in a range.

    eg

    question.PNG
    (The above image is just an example of what im trying to achieve)

    I've tried a combination of countif and unique but to no avail.

    Coudl somebody point me in the right direction?

    Thankyou for your time
    Last edited by retroisbest; 10-23-2017 at 09:52 AM.

  2. #2
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Need to show text value of highest recurring text based on another text value

    Hello and welcome to the forum.

    With your names in A2:A9, countries in B2:B9, John Smith in D2, and Gill Smith in D3, try this in E2:

    =INDEX(B$2:B$9,MODE(IF(A$2:A$9=D2,MATCH(B$2:B$9,B$2:B$9,0)))) Ctrl Shift Enter

  3. #3
    Registered User
    Join Date
    10-23-2017
    Location
    In My Office
    MS-Off Ver
    2013
    Posts
    3

    Re: Need to show text value of highest recurring text based on another text value

    Quote Originally Posted by 63falcondude View Post
    Hello and welcome to the forum.

    With your names in A2:A9, countries in B2:B9, John Smith in D2, and Gill Smith in D3, try this in E2:

    =INDEX(B$2:B$9,MODE(IF(A$2:A$9=D2,MATCH(B$2:B$9,B$2:B$9,0)))) Ctrl Shift Enter
    Thankyou very much worked a treat!

  4. #4
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Need to show text value of highest recurring text based on another text value

    You're welcome. Thanks for the rep!

  5. #5
    Registered User
    Join Date
    10-23-2017
    Location
    In My Office
    MS-Off Ver
    2013
    Posts
    3

    Re: Need to show text value of highest recurring text based on another text value

    Quote Originally Posted by 63falcondude View Post
    You're welcome. Thanks for the rep!
    No problem its well deserved!
    One little question if a person only exists once it errors out the result because mode is trying to match on more than one result is there anyway of still showing the country if there is only a single occurrence? (MODE cannot produce a result. No values occur more than once)

    Don't worry if not im more than happy with this result

  6. #6
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Need to show text value of highest recurring text based on another text value

    Sure. If there is no mode, you can use a regular matching formula to return the first match. Something like this:

    =IFERROR(INDEX(B$2:B$9,MODE(IF(A$2:A$9=D2,MATCH(B$2:B$9,B$2:B$9,0)))),INDEX(B$2:B$9,MATCH(D2,A$2:A$9,0)))

+ 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: 12-17-2015, 03:35 AM
  2. Replies: 4
    Last Post: 09-21-2015, 05:07 AM
  3. Show cell value(text) in comment box text, or mouse tool tip on an gif icon
    By JIBG in forum Excel Programming / VBA / Macros
    Replies: 18
    Last Post: 05-19-2014, 06:50 AM
  4. [SOLVED] Display with first three text name with highest number of records based on date
    By abraham30 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-11-2014, 07:01 PM
  5. [SOLVED] function IF to return text based if text contains exact text
    By in nomine noctis in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-05-2013, 06:25 AM
  6. cell B will automatically show a text depending on the text on column A
    By Elainefish in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-05-2013, 05:57 AM
  7. Replies: 1
    Last Post: 04-27-2012, 07:24 AM

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.6.0 RC 1