How do I add "if blank" to disregard

Brass Contributor

I have this formula =MAX(W2,Y2,AA2,AC2,AE2,AG2,AI2) to calculate the most current date in the following cells, I want to add that to leave the cell blank if there is no date in one of the cells so I don't get "1/0/1900" as a date that gets filled in

2 Replies
=IF(OR(ISBLANK(W2), ISBLANK(Y2), ISBLANK(AA2), ISBLANK(AC2), ISBLANK(AE2), ISBLANK(AG2), ISBLANK(AI2)), "", MAX(W2, Y2, AA2, AC2, AE2, AG2, AI2))

@jaolvera 

Try this formula:

=LET(
    dates, TAKE(WRAPCOLS(W2:AI2, 2, 0), 1),
    IF(COUNT(dates) < 1, "", MAX(dates))
)