公式报错:Remaining text not part of formula,嵌套IF语句编写求助
Fixing the "Remaining text not part of formula" Error in Your Nested IF Formula
Got it, let's sort out that formula error you're hitting! The Remaining text not part of formula message is popping up because your current code doesn't follow the correct nested IF syntax—you tried to tack a second condition directly onto the ELSE clause without wrapping it in a proper IF statement.
What Was Wrong with the Original Code?
Your original code has two key syntax issues:
IF Workorder.Text like "*romano*" then replace Workorder.Text, 'Black Feet' , '') else Workorder.Text isNull then WorkOrder.Item
- You missed an opening parenthesis for the
REPLACEfunction - You can't write a condition (
Workorder.Text isNull) directly after ELSE—you need to useELSE IFto chain a second check, or nest another IF entirely.
Corrected Nested IF Formula
Here's the fixed version that follows proper syntax and achieves your desired logic:
IF Workorder.Text like "*romano*" THEN REPLACE(Workorder.Text, 'Black Feet', '') ELSE IF ISNULL(Workorder.Text) THEN WorkOrder.Item ELSE Workorder.Text
Breakdown of the Logic:
- First Check: If
Workorder.Textcontains "romano", it replaces any instance of "Black Feet" with an empty string (removing it) and returns that modified text. - Second Check: If the first condition fails, it then checks if
Workorder.Textis empty. If it is, it returns the value fromWorkOrder.Item. - Fallback: If neither condition is true, it just returns the original
Workorder.Textas-is.
This structure ensures every part of the formula is valid, so you won't get that "remaining text" error anymore.
内容的提问来源于stack exchange,提问作者user9399808
相关产品推荐
相关产品推荐

