Boolean Expected

Craig Lemberger
Craig Lemberger โœญโœญโœญโœญ

=COUNTIFS({Client Name/Planter Location}, Client@row, {Bed Plants (Early Spring)}, 1)

I'm trying to match a name on a current sheet with that on another sheet; and on the other sheet, the name may appear multiple times with one or more checked boxes under Bed Plants Early spring.

The results are: a box gets checked or i get the boolean expected error. I checked the source sheet: if the Bed Plants early spring has multiple checked boxes, I get a boolean expected; if there is only one box checked, I get a box checked.

How do i just get the box to be checked.

Tags:

Best Answer

  • Kerry St. Thomas
    Kerry St. Thomas Community Champion
    Answer โœ“

    As usual, there's more than one way to achieve a result using Smartsheet. I love that flexibility!

    And this result is simple: boolean input accepts ONLY 0 (unchecked) or 1 (checked). The boolean error means your formula is returning something larger than 1. The fix is pretty straightforward: wrap your formula in an IF, so it only returns 0 or 1.
    =IF(COUNTIFS({Client Name/Planter Location}, Client@row, {Bed Plants (Early Spring)}, 1) >0 , 1, 0)

    You can also use MIN with your formula: If it doesn't count anything, the smallest number is going to be 0. If it DOES count anything, the smallest number is going to be 0.
    =MIN(COUNTIFS({Client Name/Planter Location}, Client@row, {Bed Plants (Early Spring)}, 1),1)

    Whether you decide to use one of these or something else entirely, good luck!

    If this answer resolves your question, please help the Community by marking it as an accepted answer. I'd also be grateful for your response - "Insightful"or "Awesome" reactions are much appreciated. Thanks!

Answers

  • Kerry St. Thomas
    Kerry St. Thomas Community Champion
    Answer โœ“

    As usual, there's more than one way to achieve a result using Smartsheet. I love that flexibility!

    And this result is simple: boolean input accepts ONLY 0 (unchecked) or 1 (checked). The boolean error means your formula is returning something larger than 1. The fix is pretty straightforward: wrap your formula in an IF, so it only returns 0 or 1.
    =IF(COUNTIFS({Client Name/Planter Location}, Client@row, {Bed Plants (Early Spring)}, 1) >0 , 1, 0)

    You can also use MIN with your formula: If it doesn't count anything, the smallest number is going to be 0. If it DOES count anything, the smallest number is going to be 0.
    =MIN(COUNTIFS({Client Name/Planter Location}, Client@row, {Bed Plants (Early Spring)}, 1),1)

    Whether you decide to use one of these or something else entirely, good luck!

    If this answer resolves your question, please help the Community by marking it as an accepted answer. I'd also be grateful for your response - "Insightful"or "Awesome" reactions are much appreciated. Thanks!

  • Craig Lemberger
    Craig Lemberger โœญโœญโœญโœญ

    Beautiful!! It worked. thank you very much.

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!