Returning txt in one cell depending on multiple check boxs with IF & AND

Hi,

I'm trying to use IF & AND statements to return text to one cell depending on the condition of multiple check boxes. I have searched through the community posts and can't find the answer. Any help would be greatly appreciated. Below is what I have so that can't get to work.

=IF(AND([Electric Disconnected]@row = 1, "Disconnect Water", IF([Water Disconnected]@row = 1,"Disconnect Electric", IF(AND([Electric Disconnected]@row=1,[Water Disconnected]@row=1),"Disconnect Complete",[""]))))

Best Answer

  • Jason Tarpinian
    Jason Tarpinian ✭✭✭✭✭✭
    Answer ✓

    The square brackets [ ] are used in Smartsheet to indicate column names, so that is returning an error in your formula. I'd also adjust the logic to check for both disconnections first, otherwise it would never return "Disconnect Complete" (because when "Electric Disconnected" returns true, the formula stops, and doesn't go to the next false statement).

    =IF(AND([Electric Disconnected]@row = 1, [Water Disconnected]@row = 1), "Disconnect Complete", IF([Electric Disconnected]@row = 1, "Disconnect Water", IF([Water Disconnected]@row = 1, "Disconnect Electric", "")))

    Jason Tarpinian - Sevan Technology

    Smartsheet Aligned Partner

Answers

  • Update sorry for some reason I had IF and at the beginning.

    =IF([Electric Disconnected]@row = 1, "Disconnect Water", IF([Water Disconnected]@row = 1,"Disconnect Electric", IF(AND([Electric Disconnected]@row=1,[Water Disconnected]@row=1),"Disconnect Complete",[""]))))

  • Jason Tarpinian
    Jason Tarpinian ✭✭✭✭✭✭
    Answer ✓

    The square brackets [ ] are used in Smartsheet to indicate column names, so that is returning an error in your formula. I'd also adjust the logic to check for both disconnections first, otherwise it would never return "Disconnect Complete" (because when "Electric Disconnected" returns true, the formula stops, and doesn't go to the next false statement).

    =IF(AND([Electric Disconnected]@row = 1, [Water Disconnected]@row = 1), "Disconnect Complete", IF([Electric Disconnected]@row = 1, "Disconnect Water", IF([Water Disconnected]@row = 1, "Disconnect Electric", "")))

    Jason Tarpinian - Sevan Technology

    Smartsheet Aligned Partner