Alex
Alex

Reputation: 68070

Google sheets IF with multiple conditions

This works fine, meaning it applies to the entire column.

=ARRAYFORMULA(IF(J:J > TODAY(), DATEDIF(TODAY(),J:J,"D"), "x"))

But I want to exclude the first J row which is not a date, I need to add AND so it becomes

=ARRAYFORMULA(IF(AND(ISDATE(J:J), J:J > TODAY()), DATEDIF(TODAY(),J:J,"D"), "x"))

and now it doesn't work anymore and the entire column is empty

So how to make ARRAYFORMULA work with multiple conditions ?

Upvotes: 0

Views: 201

Answers (1)

player0
player0

Reputation: 1

AND and OR are not supported within ARRAYFORMULA

try:

 =ARRAYFORMULA(IF((IFERROR(DATEVALUE(J:J)))*(J:J > TODAY()), 
  DATEDIF(TODAY(), J:J, "D"), "x"))

0

Upvotes: 1

Related Questions