mardi 2 février 2016

Multiple nested if blocks in google spreadsheets formulas

Im trying to write a nested if statement like this pseudo code :

=IF(h4=1, "CORRECT", IF(h4=2, "CORRECT"), IF(h4=3, "CORRECT"), IF(h4=4, "CORRECT")) 

But im getting the following error, if i write out the code about and add an if statement each time. ie. start with only the first if block and then add more testing each time, it breaks when i add the third statement.

Wrong number of arguments to IF. Expected between 2 and 3 arguments, but received 4 arguments.

Is there a better way to nest if blocks in google spreadsheets ?

Ive made a google spreadsheet of the issue here : http://ift.tt/1PQcSPE

(the above code is only an example of nesting IF blocks, not the actual issue im trying to solve)

Aucun commentaire:

Enregistrer un commentaire