Forum Discussion

jaolvera's avatar
jaolvera
Brass Contributor
Oct 31, 2023

How do I add "if blank" to disregard

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

  • Patrick2788's avatar
    Patrick2788
    Silver Contributor

    jaolvera 

    Try this formula:

    =LET(
        dates, TAKE(WRAPCOLS(W2:AI2, 2, 0), 1),
        IF(COUNT(dates) < 1, "", MAX(dates))
    )
  • =IF(OR(ISBLANK(W2), ISBLANK(Y2), ISBLANK(AA2), ISBLANK(AC2), ISBLANK(AE2), ISBLANK(AG2), ISBLANK(AI2)), "", MAX(W2, Y2, AA2, AC2, AE2, AG2, AI2))

Resources