I am trying to set the status of the last column ("Status") to show "Boosted", "Vaccinated", "Religious Exemption" using an ArrayFormula so I don't have to add the formula every time I add an employee to the list.
={"Covid Status";
ARRAYFORMULA (
IF (
A2:A = "Religious Exemption" ,
"Religious Exemption" ,
IF (
AND ( OR ( A2:A = "Moderna" , A2:A = "Pfizer" ) ,
AND ( ISDATE ( B2:B ) = TRUE , ISDATE ( C2:C ) = TRUE , ISDATE ( D2:D ) = TRUE ) ) ,
"Boosted" ,
IF (
AND ( OR ( A2:A = "Moderna" , A2:A = "Pfizer" ) ,
AND ( ISDATE ( B2:B ) = TRUE, ISDATE ( C2:C ) = TRUE , ISDATE ( D2:D ) = FALSE ) ) ,
"Vaccinated",
)
)
)
)
}
I wouldn't mind adding "Unvaccinated" to the list either, but blank is sufficient.
If there's an easier way to achieve the results, I'm way open to options. The "last" column in the sheet is the desired result.
I've used the formula without being in an array, but it doesn't work as an array.
I hope I've shared it correctly.
https://docs.google.com/spreadsheets/d/1LIpe0uo6RQtbcAUcB6V5jrGaX-9wuSm-2vTU5Vj03Cs/edit?usp=sharing




Instead of
AND(a,b)usea*band instead ofOR(a,b)usea+band instead ofISDATEuseISDATE_STRICT.You could also use the
MAPfunction.