Forum Discussion

OUTLOOK670's avatar
OUTLOOK670
Copper Contributor
Dec 04, 2019

Excel function not working

Hello,

I have Windows 10 and I am trying to use this function in excel however it is not working. It is just giving me the error #NAME. Other team members are able to sue this function- would yo know what the problem is?

 

=IF(ItemName="","",CONCATENATE(IF(OR(VendorMapRules="update",AND(PurchasePrice=0,MAP=0),AND(IFERROR(ShipCost=0,FALSE),ShipCostOverride="no override",MAP=0),ISERROR(ShipCost),AND(Disc="yes",MapRequired="yes",VendorMapRules<>"NO MAP"),ISERROR(FloorPriceAdjusted*1),AND(IFERROR(ProfitAtFloor+0.01<DesiredProfit,FALSE),ExcludedFloor="",FollowExcluded="Follow excluded",VendorMapRules<>"Set at base"),VendorMapRules="",AND(DSItem=TRUE,DSFee=0,ifna(ItemFulfillmentCost=0,TRUE))),"Error:",0),IF(VendorMapRules="update"," Update vendor MAP rules",""),IF(AND(PurchasePrice=0,MAP=0)," $0 purchase price",""),IF(AND(IFERROR(ShipCost=0,FALSE),ShipCostOverride="no override",MAP=0)," $0 ship cost",""),IF(ISERROR(ShipCost),IF(SalesChannel="FBM"," Missing shipping data","No FBA fulfillment fee"),""),IF(AND(DSItem=TRUE,DSFee=0,ifna(ItemFulfillmentCost=0,TRUE))," No DS fee",""),IF(VendorMapRules=""," No vendor MAP rule",""),IF(AND(IFERROR(ProfitAtFloor+0.01<DesiredProfit,FALSE),ExcludedFloor="",FollowExcluded="Follow excluded",VendorMapRules<>"Set at base")," Profit lower than desired",""),IF(ISERROR(FloorPriceAdjusted*1)," Floor cannot be calculated",""),IF(AND(Disc="yes",MapRequired="yes",VendorMapRules<>"NO MAP")," MAP & disc","")))

4 Replies

  • SergeiBaklan's avatar
    SergeiBaklan
    Diamond Contributor

    OUTLOOK670 

    In addition to all above, if write such formulas when use at least some formatting

    =IF(ItemName="",
       "",
       CONCATENATE(
          IF(OR(
                VendorMapRules="update",
                AND(PurchasePrice=0,MAP=0),
                AND(
                   IFERROR(ShipCost=0,FALSE),
                   ShipCostOverride="no override",
                   MAP=0
                ),
                ISERROR(ShipCost),
                AND(
                   Disc="yes",
                   MapRequired="yes",
                   VendorMapRules<>"NO MAP"
                ),
                ISERROR(FloorPriceAdjusted*1),
                AND(
                   IFERROR(ProfitAtFloor+0.01<DesiredProfit,FALSE),
                   ExcludedFloor="",
                   FollowExcluded="Follow excluded",
                   VendorMapRules<>"Set at base"
                ),
                VendorMapRules="",
                AND(
                   DSItem=TRUE,
                   DSFee=0,
                   ifna(ItemFulfillmentCost=0,TRUE)
                )
             ),
             "Error:",0),
          IF(
             VendorMapRules="update",
             " Update vendor MAP rules",""
          ),
          IF(
             AND(PurchasePrice=0,MAP=0),
             " $0 purchase price",""
          ),
          IF(
             AND(IFERROR(ShipCost=0,FALSE),
                ShipCostOverride="no override",MAP=0
             ),
             " $0 ship cost",""
          ),
          IF(
             ISERROR(ShipCost),
             IF(
                SalesChannel="FBM",
                " Missing shipping data",
                "No FBA fulfillment fee"
             ),
             ""
          ),
          IF(
             AND(
                DSItem=TRUE,
                DSFee=0,
                ifna(ItemFulfillmentCost=0,TRUE)
             ),
             " No DS fee",
             ""
          ),
          IF(
             VendorMapRules="",
             " No vendor MAP rule",
             ""
          ),
          IF(
             AND(
                IFERROR(ProfitAtFloor+0.01<DesiredProfit,FALSE),
                ExcludedFloor="",
                FollowExcluded="Follow excluded",
                VendorMapRules<>"Set at base"
             ),
             " Profit lower than desired",
             ""
          ),
          IF(
             ISERROR(FloorPriceAdjusted*1),
             " Floor cannot be calculated",
             ""
          ),
          IF(
             AND(
                Disc="yes",
                MapRequired="yes",
                VendorMapRules<>"NO MAP"
             ),
             " MAP & disc",
             ""
          )
       )
    )
  • OUTLOOK670 

    I would suggest you break out the 10 IF statements inside the CONCATENATE function into 10 separate cells, and then reference the 10 separate cells in the CONCATENATE

  • mathetes's avatar
    mathetes
    Gold Contributor

    OUTLOOK670 

     

    Riny is being kind when he describes that as "an incredible function"

     

    In fact it's a casebook example of a DYSfunctional Function. I think any good reference manual on Excel will warn that just because it's possible to write a formula that is, whatever, a 1,000 characters long, doesn't mean it's a good idea. It might be fun to have written such a function and to have had it work on occasion. I've written function formulas that are nested three or four levels deep, but what the reference manuals will tell you is that they're hard to decode or understand even when they do work, and for all practical purposes impossible to maintain.

     

    So yes, break it apart--in your case, probably into ten or twenty separate cells with ten or twenty separate results, some of them "TRUE" or "FALSE," with some kind of notation as to what each is telling you... 

  • Riny_van_Eekelen's avatar
    Riny_van_Eekelen
    Platinum Contributor

    OUTLOOK670 

    What an incredible function. Would say it's almost impossible to maintain. It refers to a lot of named ranges. If one or more are missing in your workbook, you'll get the #NAME error. Consider a  combination of simpler functions to achieve whatever you are after.

     

     

Resources