# Formula to populate a 1 or a 0 based off of criteria

Options

I have 6 columns where each of them will contain Yes or No. I want to know when a row contains all Yes's, and also when a row contains ANY No's. I added an additional column for "Approved" (for when all of the 6 columns is Yes), and "Denied" (for when any of the six columns is No).

My end goal is to be able to sum those counts (I know how to do this part), to say X amount of rows were Approved (all Yes's) and X amount of rows had at least 1 No (Denied).

• ✭✭✭✭✭✭
Options

Try something like this. (replace the column names to yours)

=IF(COUNTIF([Column 1]@row:[Column 6]@row; "No") > 0; "Denied"; IF(COUNTIF([Column 1]@row:[Column 6]@row; "Yes") = 6; "Approved"))

The same version but with the below changes for convenience.

=IF(COUNTIF([Column 1]@row:[Column 6]@row, "No") > 0, "Denied", IF(COUNTIF([Column 1]@row:[Column 6]@row, "Yes") = 6, "Approved"))

Depending on your country/region, you'll need to exchange the comma to a period and the semi-colon to a comma.

Did that work?

I hope that helps!

Be safe and have a fantastic week!

Best,

Andrée Starå | Workflow Consultant / CEO @ WORK BOLD

SMARTSHEET EXPERT CONSULTANT & PARTNER

Andrée Starå | Workflow Consultant / CEO @ WORK BOLD

W: www.workbold.com | E:andree@workbold.com | P: +46 (0) - 72 - 510 99 35

Feel free to contact me for help with Smartsheet, integrations, general workflow advice, or anything else.

## Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!