Best answer

Nested If Statements in Spreadsheet-Style Formulas

  • 29 March 2021
  • 4 replies
  • 286 views

Userlevel 1

Hi there,

I'm trying to use Numbers: Spreadsheet style formula to write a nested IF statement and I keep getting this error: Error parsing response. We got: "<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> Show details. Here is the statement: 

If("{{Alpine School District Schools}}"<>"", "{{Alpine School District Schools}}", If ("{{Bonsall Unified School District Schools}}"<>"","{{Bonsall Unified School District Schools}}", "NA")

(As an FYI, when I copy and pasted this here I removed the numbers that precede the fields when copying and pasting {110470936Alpine School District Schools}}) 

 

This is stating if the field (which is a picklist) Alpine School District is not blank, add the school selected in this field; if it is blank but Bonsall School district is not blank, add the school selected in the Bonsall School District field, if Bonsall is also blank, add “NA”.

 

Any guidance on how to write to correctly is welcome.

 

icon

Best answer by Troy Tessalone 29 March 2021, 16:43

View original

This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

4 replies

Userlevel 7
Badge +14

Hi @Jess_Ros 

Not sure if this will solve the issue, but looks like you’re missing a closing ) at the end since you have nested IFs.

Userlevel 1

Hi @Troy Tessalone, Do you mean after the “NA”)...so that it should be If("{{Alpine School District Schools}}"<>"", "{{Alpine School District Schools}}", If ("{{Bonsall Unified School District Schools}}"<>"","{{Bonsall Unified School District Schools}}", "NA"))

 

If not, let me know what you’re thinking. If so, unfortunately that did not work. Any other guidance or guesses welcome.

Userlevel 7
Badge +14

Hi @Jess_Ros 

Make sure to remove the extra spaces in the formula at the start of the nested IF, that ought to fix the error.

 

Userlevel 1

Brilliant, Thank you so much!