+ Reply to Thread
Results 1 to 7 of 7

max(filter()) giving an error for date range in sheets

  1. #1
    Registered User
    Join Date
    11-19-2019
    Location
    ROK
    MS-Off Ver
    365
    Posts
    48

    max(filter()) giving an error for date range in sheets

    I am trying to find the date that a student had their top score. I find the top score using maxifs. When I trying to find the data I have tried using maxifs or filter and the max on the filter and I still get the same error.

    One of my students (B A) had the same results on 2 different days. (10/29/2021 and 10/15/2021). Filter returns these two dates. I do an isdate() on both and get a true. But when I do a max on the results I get a 0.

    I think I created a link to the data: https://docs.google.com/spreadsheets...it?usp=sharing

    If you looking the results tab, student B A had the same top score (15.03) on 10/29/2021 and 10/15/2021. When I do a Max on the the filter it returns 0.

    Why does the max cause the value to be 0?

    If I do a maxifs I get the same results. I think it has something to do with do max on a date but I don't know why it isn't working. Everything I read says Max or Maxifs should work. If I do an index on the filter =INDEX(FILTER(data!B:B,data!A:A=A6,data!F:F=B6),1) it does work, but to me index isn't as logical as Max and I want to know why Max doesn't work.

  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: max(filter()) giving an error for date range in sheets

    Please do not post sheets to other sites. Read the yellow banner at the top of this page on how to post to this site.
    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
    Valued Forum Contributor janmorris's Avatar
    Join Date
    07-24-2021
    Location
    Japan
    MS-Off Ver
    Google Sheets (& Mac 2021)
    Posts
    1,066

    Re: max(filter()) giving an error for date range in sheets

    the problem is that you are not using a consistent date format.

    "data" column B must be formatted as a Date, and so too should "results" column C
    Last edited by janmorris; 11-24-2021 at 05:10 AM.

  4. #4
    Registered User
    Join Date
    11-19-2019
    Location
    ROK
    MS-Off Ver
    365
    Posts
    48

    Re: max(filter()) giving an error for date range in sheets

    Quote Originally Posted by janmorris View Post
    the problem is that you are not using a consistent date format.

    "data" column B must be formatted as a Date, and so too should "results" column C
    I suspected this, but when I did the =isdate() I got a true. How can I format the data to it is a date?

  5. #5
    Valued Forum Contributor janmorris's Avatar
    Join Date
    07-24-2021
    Location
    Japan
    MS-Off Ver
    Google Sheets (& Mac 2021)
    Posts
    1,066

    Re: max(filter()) giving an error for date range in sheets

    i already changed the format from the menu, see the image for where to change format style/type

    Screen Shot 2021-11-24 at 10.26.50 pm.png

  6. #6
    Registered User
    Join Date
    11-19-2019
    Location
    ROK
    MS-Off Ver
    365
    Posts
    48

    Re: max(filter()) giving an error for date range in sheets

    That worked. Thank you!! Is there a way so I do not have to do this every time I import data? or a way to do this with a command inside of the filter function? Worst case it will add one more step to my daily import.

    Thank you again!!

  7. #7
    Valued Forum Contributor janmorris's Avatar
    Join Date
    07-24-2021
    Location
    Japan
    MS-Off Ver
    Google Sheets (& Mac 2021)
    Posts
    1,066

    Re: max(filter()) giving an error for date range in sheets

    if importing from another sheet with IMPORTRANGE, then you should format the original data as date.

    if you are copy/pasting then you can try "Paste special" > "Paste as values"

+ 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. SUMIF based on Date Range giving error
    By Vimalan101 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-12-2021, 02:49 AM
  2. [SOLVED] Advanced Filter named Table in VBA giving ERROR
    By sorensjp in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-24-2020, 03:27 PM
  3. [SOLVED] VBA 'convert date' code giving 'run time error 9 - subscript out of range'
    By seputus in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-05-2017, 07:43 PM
  4. Offset function giving a #N/A error when no data in the range
    By bdrod in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-05-2015, 06:55 PM
  5. [SOLVED] Range error in code, runs alone but not inside my full program, giving runtime error 1004
    By charizzardd in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-23-2012, 03:34 PM
  6. Replies: 1
    Last Post: 04-12-2011, 10:37 AM
  7. Protected sheets w/macros giving runtime error 1004
    By cedarhill in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-03-2009, 07:59 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