+ Reply to Thread
Results 1 to 5 of 5

Index/mode formula

  1. #1
    Registered User
    Join Date
    08-19-2015
    Location
    Ontario
    MS-Off Ver
    Office Home and Business 2013
    Posts
    19

    Question Index/mode formula

    I am utilizing the following formula to give me the most common answer from 3 cells. =INDEX(C24:E24,MODE(MATCH(C24:E24,C24:E24,0)))
    The issue I am running into is when all 3 cells show a different phrase I am getting this #N/A. How do I build something into this formula to tell excel that if this circumstance happens to choose one of the 3 that I choose to tell it.
    Example)
    Phrase 1 Phrase 2 Phrase 3
    Mouse Cat Dog = #N/A - I would like it in this case to choose Mouse because under the circumstances that created those phrases in those cells mouse had the most opportunity to end up there.

    Thanks in advance!

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,457

    Re: Index/mode formula

    Perhaps you explain " because under the circumstances that created those phrases in those cells mouse had the most opportunity to end up there.

    How are we to know that Mouse is "preferred" over Cat or DOG.

    Perhaps a sample file would us understand what you require, with logic explained.

  3. #3
    Registered User
    Join Date
    08-19-2015
    Location
    Ontario
    MS-Off Ver
    Office Home and Business 2013
    Posts
    19

    Re: Index/mode formula

    Well the way it got there does not matter for what I am thinking. I essentially am thinking I have chosen what I want it to put instead of #N/A so I do not need excel to choose that. I only need to tell excel that is there is no mode/answer and it is going to produce an answer of #N/A then I want it to choose Mouse, as in mouse the phrase not the cell that contains the phrase Mouse. Does that make a bit more sense then?

  4. #4
    Forum Contributor
    Join Date
    06-21-2010
    Location
    -
    MS-Off Ver
    Excel 2010
    Posts
    1,211

    Re: Index/mode formula

    Hi Tanya,

    If the outcome should always be the answer from Phrase 1 when the responses to all three phrases are different, simply use an 'IFERROR' to catch the error and decide what the correct response to show should be.

    Please Login or Register  to view this content.
    If it is not the Phrase 1 answer and an answer you've pre-decided then perhaps


    Please Login or Register  to view this content.
    It depends on whether the answer you want to show is consistent, if not then the above formula could simply be expanded with some IF Statements, depending on the method you are using to decide the answer you want to show.
    Last edited by HangMan; 09-10-2015 at 11:01 AM.

  5. #5
    Registered User
    Join Date
    08-19-2015
    Location
    Ontario
    MS-Off Ver
    Office Home and Business 2013
    Posts
    19

    Re: Index/mode formula

    great!! Thank you. =IFERROR(INDEX($C24:$E24,MODE(MATCH($C24:$E24,$C24:$E24,0))),"Mouse") This worked exactly for what I needed. What I wanted was in fact for it to just let me say choose this phrase not this cell this phrase is currently in as it could changed based on other entries. SOLVED!!

+ 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. Match, Mode and Index... And Dropdowns?
    By Oilfield in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 08-12-2015, 07:11 PM
  2. [SOLVED] MODE and Index Match Formula
    By dash11 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 01-21-2015, 01:32 PM
  3. [SOLVED] Code skips on Run Mode but runs fine on F8 (Debug Mode)
    By RaquelAR in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 11-25-2013, 01:05 PM
  4. Index/Match & Mode?
    By WWSL14 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-20-2013, 04:04 PM
  5. Replies: 14
    Last Post: 11-30-2012, 02:54 PM
  6. Index, Mode & Match Problem?
    By BodyHaven in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-10-2008, 06:53 PM
  7. Can I use VBA to check if the sheet(xxx) is in Page-Break mode or Normal mode ?
    By BaLLZaCH in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-15-2008, 09:03 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