if statement - Multiple nested if blocks in google spreadsheets formulas -
im trying write nested if statement pseudo code :
=if(h4=1, "correct", if(h4=2, "correct"), if(h4=3, "correct"), if(h4=4, "correct"))
but im getting following error, if write out code , add if statement each time. ie. start first if block , add more testing each time, breaks when add third statement.
wrong number of arguments if. expected between 2 , 3 arguments, received 4 arguments.
is there better way nest if blocks in google spreadsheets ?
ive made google spreadsheet of issue here : https://docs.google.com/spreadsheets/d/1mbomatni5c_spsvudcqpeanhtofr36kglg9bxueazxu/edit#gid=0
(the above code example of nesting if blocks, not actual issue im trying solve)
the error simple syntax issue - placement of parentheses - here correct:
=if(h4=1, "correct", if(h4=2, "correct", if(h4=3, "correct")))
i fixed on spreadsheet.
every if statement must have 3 parts essentially, if(this, this, else this) when nesting, else part of formula next condition..
=if(h4=1, "correct", if(h4=2, "correct", if(h4=3, "correct", if(h4=4, "correct"))))
Comments
Post a Comment