Cant figure out IF statement syntax error

  • 1
  • Problem
  • Updated 7 months ago
  • Solved
Hello, 

I have a nested IF statement shown below that seems to have correct logic yet I am getting an odd error. 

Formula used in the UI-Only field:
IF({{NRR}} <= 100, ({{OriginalBook}}-{{BookWon}})*0.0025,
   IF({{NRR}} > 100 && <= 120,
      {{OriginalBook}}*0.0025 + ({{BookWon}}-{{OriginalBook}})*0.0075,
      {{OriginalBook}}*0.0025 + ({{OriginalBook}}*0.25)*0.0075 + ({{BookWon}}-({{OriginalBook}}*1.25))*0.015))

Error:
SyntaxError: Expected "'", "(", ".", "\"", "date", "false", "null", "true", "undefined", [ \x0C\n\r\t\x0B  ᠎ - 

   ], [0-9], [\-+!], or [a-z] but "<" found.

{{NRR}} is another formula field returning a number.
Photo of Michael Schniepp

Michael Schniepp

  • 1,808 Points 1k badge 2x thumb

Posted 7 months ago

  • 1
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,714 Points 20k badge 2x thumb
IF({{NRR}} > 100 && s missing the {{NRR}} after &&
Photo of Michael Schniepp

Michael Schniepp

  • 1,808 Points 1k badge 2x thumb
wow beautiful, thank you. Can't believe I missed that