# Help with COUNTIF formula

Options
edited 12/09/19

I am trying to write a formula that will automatically fill in the checkbox IF another checkbox cell is also checked.

Here is the current formula I am using.

=IF(COUNTIF([Repair Doors Needed]:[Repair Doors Needed], [Repair Doors Needed]@row) > 1, 0, 1)

The weird thing is, this formula works on some of my sheets, but doesn't work on others. little confused as to how it can work sometimes, but not all the time.

thanks for you help.

Tags:

• ✭✭✭✭✭✭
Options

Can you simplify the formula to: =IF([Repair Doors Needed]@row= 1, 1, 0)

• ✭✭✭✭✭✭
Options

Basically you are saying...

If there is more than one box checked in the [Repair Doors Needed] column, Leave this box unchecked. If there is one or less boxes checked, then check this box.

Is that what you are trying to do, because that doesn't quite match what you said in the post? It may only be working in some sheets because it doesn't quite work exactly the way you intended it to, but other sheets return a coincidental positive because the criteria just happens to run through the formula to return a positive value which just so happens to line up with another value (the one you are trying to produce).

• Options

Gotcha. Ok. So here's what I want it to do. I want the formula to do this...

"IF the 'Repair Doors Needed' box is checked, THEN...check the 'Repair Needed' box, AND copy the contents of the 'Repair Door Sizes To Order' to the 'Repair Notes' box.

• Options

yes, but that only solves 1/2 of my problem. When repair doors needed is checked, I need it to check 'Repair Needed' AND ALSO, copy the text from the 'Repair Door Sizes To Order' box.

I basically have 2 formulas. see screenshots below

• ✭✭✭✭✭✭
Options

Ok. So in the checkbox you will use

=IF([Repair Doors Needed]@row= 1, 1, 0)

In the Notes cell you would use

=IF([Repair Doors Needed]@row = 1, [Repair Door Sizes To Order]@row

• Options

AWESOME!!! It worked! Perfect. Exactly what I was looking for. Thanks so much! Huge help!

SGF

• ✭✭✭✭✭✭
Options

## Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!