Jesse
Jesse

Reputation: 23

Similar arrayformula working, non-array formula working, why not this arrayformula?

This arrayformula works in my spreadsheet:

=arrayformula(IF(A3:A<>"", DATEDIF(H3:H,"01/01/21","m"), ""))

This non-array is working:

=DATEDIF(MAX(datevalue(H3), "1/1/2021"),"01/01/22","m")

So I would think this would work as an arrayformula version of the working non-array:

=arrayformula(IF(A3:A<>"", DATEDIF(MAX(datevalue(H3:H), "1/1/2021"),"01/01/22","m"), ""))

Instead, I get this error:

DATEVALUE parameter '' cannot be parsed to date/time.

Can anyone please point me to what I might be doing wrong? Or why this arrayformula won't work?

Upvotes: 2

Views: 90

Answers (2)

player0
player0

Reputation: 1

use:

=INDEX(IF(A2:A<>"", DATEDIF(MAX(H2:H, "1/1/2021"), "1/1/2022", "m"), ))

Upvotes: 1

marikamitsos
marikamitsos

Reputation: 10573

Please use the following:

=arrayformula(IF(A3:A<>"", DATEDIF(MAX((H3:H), "1/1/2021"),"01/01/22","m"), ""))

Upvotes: 0

Related Questions