Share via

LAMBDA Formula Contains Unrecognized Text? How can I fix, looks like everything is declared properly in my LET() statements

Anonymous
2022-11-18T21:49:06+00:00

I am making a LAMBDA to help with calculations of profit margins when negotiating pricing,

I unfortunately am having an error arise, I set up the LAMBDA in a named range and filled it in with some sample data, and it gives me a #NAME? error, saying "The formula contains unrecognized text."

Does anyone know how I can fix this or where my unrecognized text is in this code?

=LAMBDA(Frontline,FOB,[Tax_Amt],[Units_per_Case],[Unit_PTC],[Promo_Amt],[Rebate],[Rebate_Type],[Freight],
    LET(
    FL,Frontline,
    FB,FOB,
    UC,IF(OR(ISOMITTED(Units_per_Case),Units_per_Case=""),1,Units_per_Case),
    Tax,IF(OR(ISOMITTED(Tax_Amt),Tax_Amt=""),0,Tax_Amt),
    DISC,IF(OR(ISOMMITED(Promo_Amt),Promo_Amt=""),0,Promo_Amt),
    REBT,IFS(
        OR(ISOMITTED(Rebate),Rebate="",ISOMITTED(Rebate_Type),Rebate_Type=""),
            0,
        OR(Rebate_Type="$",Rebate_Type="Amt",Rebate_Type="Amount",Rebate_Type="Dollar",Rebate_Type="Dollars",Rebate_Type="D"),
            Rebate,
        OR(Rebate_Type="%",Rebate_Type="Percent",Rebate_Type="P"),
            IF(Rebate<1,DISC*Rebate,DISC*(Rebate/100))),
    FRT,IF(OR(ISOMITTED(Freight),Freight=""),0,Freight),
    PTC,IF(OR(ISOMITTED(Unit_PTC),Unit_PTC=""),0,Unit_PTC),
    REV,FL-DISC,
    LAID,SUM(FB,FRT,Tax),
    NETREV,REV-LAID,
    PROFIT,NETREV+REBT,
        Columns,IF(PTC<>0,
            VSTACK( "Units",            "List Price",   " - Promo Amt",     "Revenue",                  "",
                    "FOB",              "Freight",      "Tax",              "Laid-In Cost",             "",
                    " = Net Revenue",   " + Rebate",    " = Profit",        "MC%",          "GAAP MC%", "",
                    "Rec. Unit PTC",    "Unit Cost",    "Unit Profit",      "Unit MC%"),
            VSTACK( "Units",            "List Price",   " - Promo Amt",     "Revenue",                  "",
                    "FOB",              "Freight",      "Tax",              "Laid-In Cost",             "",
                    " = Net Revenue",   " + Rebate",    " = Profit",        "MC%",          "GAAP MC%", "")),
        Data,IF(PTC<>0,
            VSTACK( UC,FL,DISC,REV,"",
                    FB,FRT,Tax,LAID,"",
                    NETREV,REBT,PROFIT,PROFIT/REV,PROFIT/(REV+REBT),"",
                    PTC,REV/UC,PTC-(REV/UC),(PTC-(REV/UC))/PTC),
            VSTACK( UC,FL,DISC,REV,"",
                    FB,FRT,Tax,LAID,"",
                    NETREV,REBT,PROFIT,PROFIT/REV,PROFIT/(REV+REBT))),
        HSTACK(Columns,Data)
    ))
Microsoft 365 and Office | Excel | For business | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

2 answers

Sort by: Most helpful
  1. riny 20,870 Reputation points Volunteer Moderator
    2022-11-19T09:56:25+00:00

    I pulled your formula through the "Advance Formula Environment" and spotted one typo in it.

    In the DISC row you have ISOMMITED. Change that to ISOMITTED and see if it helps.

    And as a note to Cliff, please refrain from answering if you don't understand the question(s). This has nothing to do with VBA and even if it did, there are plenty of contributors out here that are perfectly capable of dealing with very complex VBA problems.

    Was this answer helpful?

    4 people found this answer helpful.
    0 comments No comments
  2. Anonymous
    2022-11-19T09:12:50+00:00

    Dear Andy,

    Good day! 

    Thanks for posting in Microsoft Community. 

    We would love to help you on your query about VBA code, however, our team focuses on general query, for example, installation and activation issue of Office 365 products. The situation you mentioned is related to VBA code, you can to refer to this article: Office VBA support and feedback | Microsoft Docs to go to Stack Overflow by using the VBA tag, along with any other relevant tags as there are also many experienced engineers and experts in the forums there. 

    Disclaimer: Microsoft provides no assurances and/or warranties, implied or otherwise, and is not responsible for the information you receive from the third-party linked sites, or any support related to technology. 

    At the same time, we will also keep this thread open, so other Community members and Experts can also share their suggestions and inputs. 

    Thank you for your cooperation and understanding! 

    Best Regards, 

    Cliff | Microsoft Community Moderator

    Was this answer helpful?

    0 comments No comments