Google-sheets – Setting values with if and then & numbers across sheets

google sheets

I want to format a cell in Google Sheets to where if a cell on a different sheet (titled "Additional Options") has a "yes", the cell on the current spreadsheet is 1, but if it says "no", the cell on the current spreadsheet is 0. Can you help?

Best Answer

The simplest way is this:

=if('Additional Options'!A1="yes",1,0)

Assuming your value is in A1 on your target sheet.

Of course, if the value there is anything else, not just "no", it'll return 0. If you want 1 and 0 only for "yes" and "no", and something else if it's not one of those values, you can nest your if statements.

=if('Additional Options'!A1="yes",1,if('Additional Options'!A1="no",0,"-"))