Forum Discussion

Jade_Goard's avatar
Jade_Goard
Copper Contributor
Mar 02, 2021

Excel formulas/function help

Hi, I am trying to do an analysis to determine what is the best order qty and pricing considering inventory carrying cost. I put together an example but my file has  more than 200 lines.

 

This table has my source data and calculation to determine what is the best order qty and pricing.

Take PN 1 for example, it is best for me to order at 300 units at pricing of 0.6.

 

PNOrder QtyPriceBest Order Qty
PN11000.5Yes
PN12000.6Yes
PN13000.7No
PN21500.1Yes
PN22500.2Yes
PN23500.3No
PN24500.4No
PN3501.5Yes
PN31001.6No
PN31501.7No
PN32001.8No

 

I would like to know how to write a formulate using above input to spit out a table below. 

 

PNBest Order QtyPrice
PN12000.6
PN22500.2
PN3501.5

 

Thank you for any help/tip!

3 Replies

  • Rajesh_Sinha's avatar
    Rajesh_Sinha
    Iron Contributor

    Jade_Goard 

     

    Check this ,, has formula in cell D3:

    =IF(AND(B3=$F$2,C3>=$F$3),"Yes","No")

     

    An array (CSE) formula in cell H3:

    {=IFERROR(INDEX(A$3:A$13, SMALL(IF($D$3:$D$13="Yes", ROW($D$3:$D$13)-ROW($D$3)+1), ROW(1:1))),"" )}

     

    • Finish formula with Ctrl+Shift+Enter, and fill across the range.
    • Adjust cell references in the formula as needed,

     

    • Jade_Goard's avatar
      Jade_Goard
      Copper Contributor

      Rajesh_Sinha thank you very much.

       

      does this mean to calculate values in D (best order qty), I need to adjust F2 and F3, as each PN have different pricing tiers?

       

      That is something I hope to shy away as my actual file has maybe 100-200 unique PNs and each PN has 3-6 price tiers. 

Resources