Off the top of my head, this should do what you're looking for.
=IF(A1=1,100,IF(A1=4,200,IF(A1=6,300,IF(A1=10,400,0))))
Broken down into pseudo code:
IF
A1=1
THEN
100
ELSE
IF
A1=4
THEN
200
ELSE
IF
A1=6
THEN
300
ELSE
IF
A1=10
THEN
400
ELSE
0
To do it with IFS, this should do:
=IFS(A1=1, 100, A1=4, 200, A1=6, 300, A1=10, 400, true, 0)
SWITCH would be this:
=SWITCH(A1, 1, 100, 4, 200, 6, 300, 10, 400, 0)
Google Sheets functions:
- IF()
- IFS()
- SWITCH()
Hi I recently started using google sheets to make a travel plan budget cost. I was wondering if you could combine an IFS statement with an AND to test for two conditions (another cell and a checkbox). So basically it checks for a number on another cell and if a checkbox is checked. I want to check the conditions at the same time so it returns one value.
Ive tried to use the statement but it gives me a "formula parse error" (the F9 cell is a checkbox):
=IFS (E9=B2 AND F9=TRUE, C2*B2)
I've used other coding languages but I don't know if this is possible for google sheets. Does anyone have any suggestions or another operator I could use?