Why am I getting a Syntax Error

iPad Pro, iPadOS 17

Posted on Sep 19, 2024 7:15 PM

Reply
Question marked as Top-ranking reply

Posted on Sep 19, 2024 7:54 PM

It is a very blatant syntax error.


For simplicity and to shorten formulas (often very significantly), I recommend turning off the Numbers preference "Use header names as labels". Your cell "Demand Backwood...." will get its normal cell name of B2.


I am assuming you want (in English) for it to be "if B2=low then 1, else if B2=medium then 2, else if B2=high then 2 (or should that be 3?), else 'empty' ". You can do this with nested IF statements or with IFS.


=IF(B2="low",1, IF(B2="medium",2, IF(B2="high", 2,"")))

That can be simplified if those are the only possibilities for what will be in B2 but I'll leave it as as it is for now.


With IFS it will be

=IFS(B2="low",1,B2="medium",2,B2="high",2,TRUE,"")

If B2 can only be low medium or high, you can shorten this formula some.

4 replies
Question marked as Top-ranking reply

Sep 19, 2024 7:54 PM in response to motojoe00

It is a very blatant syntax error.


For simplicity and to shorten formulas (often very significantly), I recommend turning off the Numbers preference "Use header names as labels". Your cell "Demand Backwood...." will get its normal cell name of B2.


I am assuming you want (in English) for it to be "if B2=low then 1, else if B2=medium then 2, else if B2=high then 2 (or should that be 3?), else 'empty' ". You can do this with nested IF statements or with IFS.


=IF(B2="low",1, IF(B2="medium",2, IF(B2="high", 2,"")))

That can be simplified if those are the only possibilities for what will be in B2 but I'll leave it as as it is for now.


With IFS it will be

=IFS(B2="low",1,B2="medium",2,B2="high",2,TRUE,"")

If B2 can only be low medium or high, you can shorten this formula some.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Why am I getting a Syntax Error

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.