Skip to main content
Best answer

Nested If Statements in Spreadsheet-Style Formulas


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.

 

Best answer by Troy TessaloneBest answer by Troy Tessalone

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.

 

View original
Did this topic help you find an answer to your question?
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

Troy Tessalone
Forum|alt.badge.img+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.


  • Author
  • 2 replies
  • March 29, 2021

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.


Troy Tessalone
Forum|alt.badge.img+14
  • Zapier Expert
  • 31123 replies
  • Answer
  • March 29, 2021

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.

 


  • Author
  • 2 replies
  • March 29, 2021

Brilliant, Thank you so much!