+ Reply to Thread
Results 1 to 10 of 10

Mode formula to ignore blank cells

  1. #1
    Registered User
    Join Date
    09-22-2009
    Location
    Sydney,Australia
    MS-Off Ver
    MS Office 365
    Posts
    39

    Mode formula to ignore blank cells

    Hi All,

    Hope everyone is going well despite the current COVID 19 situation and I hope you, your family and friends are keeping safe.

    I need help with a formula for MODE. The formula will only work if there is data in that cell otherwise it returns a #VALUE!. If I put in zeros in the cells then the value returned is 0 which is incorrect as the return value will be wrong.

    The other cells will need to be blank as there might only be less than ten (10) people doing scorings sometimes only 5 people.

    I have attached a sample worksheet.

    Many Thanks
    Attached Files Attached Files
    Last edited by douggie; 07-09-2020 at 04:34 AM. Reason: Not enough information

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,882

    Re: Mode formula

    I changed the formula from Mode to Mode.Mult and placed zeros in the empty cells and it seemed to work. No error messages.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: Mode formula

    Please try at Z22

    =MODE(IF((G$21:W$21="Score")*(G22:W22<>""),G22:W22))

    Confirm by press Ctrl+Shift+Enter
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    09-22-2009
    Location
    Sydney,Australia
    MS-Off Ver
    MS Office 365
    Posts
    39

    Re: Mode formula

    Hi Bo-Ry,

    Thanks for that. I still an error of #N/A for some of the lines.

    See attached 6.1
    Attached Files Attached Files

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,830

    Re: Mode formula

    Administrative Note:

    We would very much like to help you with your query, however the thread title does not really convey what your request is about. Tell us what you are trying to do.

    Please take a moment to amend your thread title. Make sure that the title properly explains your request. Your title should be explicit and not be generic (this includes function names used without an indication of what you are trying to achieve).

    Please see Forum Rule #1 about proper thread titles and adjust accordingly. To edit the thread title, open the original post to edit and then click on Go Advanced (bottom right) to access the area where you can edit your title.

    (Note: this change is not optional. No help to be offered until this moderation request has been fulfilled.)
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  6. #6
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: Mode formula to ignore blank cells

    Score only appear once each.

    You may try this to pick the first Score
    =MODE(IF((E$21:W$21="Score")*(E22:W22<>"")*{1;1},E22:W22))

    or this to show Max score
    =IFNA(MODE(IF((E$21:W$21="Score")*(E22:W22<>""),E22:W22)),MAX(IF((E$21:W$21="Score")*(E22:W22<>""),E22:W22)))
    Last edited by Bo_Ry; 07-09-2020 at 04:55 AM.

  7. #7
    Registered User
    Join Date
    09-22-2009
    Location
    Sydney,Australia
    MS-Off Ver
    MS Office 365
    Posts
    39

    Re: Mode formula

    Hi Ali,

    Done. Not sure if I have done it correctly

  8. #8
    Registered User
    Join Date
    09-22-2009
    Location
    Sydney,Australia
    MS-Off Ver
    MS Office 365
    Posts
    39

    Re: Mode formula to ignore blank cells

    Just done it

  9. #9
    Registered User
    Join Date
    09-22-2009
    Location
    Sydney,Australia
    MS-Off Ver
    MS Office 365
    Posts
    39

    Re: Mode formula to ignore blank cells

    You my dear person are a lifesaver. Both of those worked like a charm.

  10. #10
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,830

    Re: Mode formula to ignore blank cells

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as 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. Replies: 1
    Last Post: 06-22-2017, 02:06 AM
  2. Trying to get the Mode, or Average if there's no MODE in a formula
    By jackmcguigan1 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 10-18-2016, 05:00 PM
  3. [SOLVED] VBA code works in debug mode but misses steps running in normal mode
    By supereeg in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-18-2016, 05:42 AM
  4. VBA AutoFilter does not Work in run mode, only in debug mode
    By aganove in forum Excel Programming / VBA / Macros
    Replies: 19
    Last Post: 11-19-2015, 04:32 PM
  5. [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
  6. 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
  7. Replies: 0
    Last Post: 01-07-2005, 04:06 PM

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