+ Reply to Thread
Results 1 to 4 of 4

Error #value! in a date array formula

  1. #1
    Registered User
    Join Date
    12-18-2012
    Location
    Gladstone Manitoba Canada
    MS-Off Ver
    Excel 2019 and 2003
    Posts
    7

    Error #value! in a date array formula

    In range A1:A1000 I have dates spanning may years with some blank cells in the range.
    I use this array formula {=MAX(IF(YEAR(A1:A1000)=C2,A1:A1000))}, in C2 I have 2018. This formula finds the last date entered in 2018. If there is any text in the range A1:A1000 I get the error #VALUE!. Is there a way to stop getting this error if there is text in the range? I have added additional conditions like ISNUMBER, but I still get the error.

    Any help would greatly be appreciated.

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,411

    Re: Error #value! in a date array formula

    Try it like this:

    =MAX(IF(ISNUMBER(A1:A1000),IF(YEAR(A1:A1000)=C2,A1:A1000)))

    Commit using Ctrl-Shift-Enter.

    Hope this helps.

    Pete

  3. #3
    Valued Forum Contributor Root_'s Avatar
    Join Date
    07-29-2017
    Location
    _
    MS-Off Ver
    2010+
    Posts
    514

    Re: Error #value! in a date array formula

    Quote Originally Posted by Jiggers View Post
    ... Is there a way to stop getting this error if there is text in the range?..
    Yes, there is -- adding just four symbols to your array formula

    =MAX(IF(YEAR(N(+A1:A1000))=C2,A1:A1000))

  4. #4
    Registered User
    Join Date
    12-18-2012
    Location
    Gladstone Manitoba Canada
    MS-Off Ver
    Excel 2019 and 2003
    Posts
    7

    Re: Error #value! in a date array formula

    Thank you both for your quick reply's . Both formulas worked perfectly.
    I am very interested how this formula works MAX(IF(YEAR(N(+A1:A1000))=C2,A1:A1000)).

+ 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. Array Formula Value Error
    By paynod in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-11-2017, 08:43 AM
  2. [SOLVED] Excel array formula and structured table date header fails with date number <10
    By sdassira in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-27-2015, 11:32 AM
  3. Array formula error
    By vonmunchy in forum Excel Formulas & Functions
    Replies: 19
    Last Post: 11-13-2013, 09:42 AM
  4. [SOLVED] #VALUE! Error In With Array Formula
    By DDM64 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-29-2013, 11:17 AM
  5. Replies: 2
    Last Post: 04-08-2012, 03:36 AM
  6. Date array function has type mismatch error...
    By secret2 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-21-2011, 02:07 PM
  7. Error #NUM! - Array Formula
    By Shermaine2010 in forum Excel General
    Replies: 2
    Last Post: 08-21-2011, 03:44 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