Kirden Posted March 31, 2014 Report Share Posted March 31, 2014 Ok, it's been a long weekend and there may have been much whiskey last night. I'm just a bit frayed around the edges and need someone to check the logic here. Situation - Store demand from warehouse stock Legend: DU - Total Demand AV - Available units in stock IB - Available units in warehouse, not stocked So: if(DU-AV>0,DU-AV) Subtract AV from DU and only return demand remaining greater than 0 units = Unfullfillable Demand If(AV>DU,DU) Return DU unit quantity if the AV quantity is greater = Available Demand if(Unfullfillable Demand>IB,IB) Return all inbound units with demand if Unfullfillable Demand is greater than the inbound units = IB1 if(Unfullfillable Demand<IB,DU-AV) Return only the inbound unit quantity with demand = IB2 IB1+IB2 = Inbound Demand Final projection: Inbound Demand + Available Demand = Estimated Fullfillable Demand Simple process I think, just fielding this for some feedback before I continue to blow brain cells. Quote Link to comment
datrod Posted March 31, 2014 Report Share Posted March 31, 2014 I think you need more whiskey. Quote Link to comment
Kirden Posted March 31, 2014 Author Report Share Posted March 31, 2014 Me too. Can't wait till 4:30... Quote Link to comment
q-tip Posted March 31, 2014 Report Share Posted March 31, 2014 The answer is 42 1 Quote Link to comment
Kirden Posted March 31, 2014 Author Report Share Posted March 31, 2014 Somehow I don't think that is even close... but I'll take it. Quote Link to comment
datzenmike Posted March 31, 2014 Report Share Posted March 31, 2014 Me too. Can't wait till 4:20... .... ah, better. Pain an nausia relief. Quote Link to comment
MikeRL411 Posted April 1, 2014 Report Share Posted April 1, 2014 "So long folks. Thanks for the fish." The only intelligent life forms on Earth [Dolphins] while departing as the Galactic Highway came to bulldoze Earth. Quote Link to comment
thisismatt Posted April 1, 2014 Report Share Posted April 1, 2014 It would make your brain hurt less if you'd name your variables something less cryptic, so you could read it without having to reference their definitions. Quote Link to comment
q-tip Posted April 1, 2014 Report Share Posted April 1, 2014 I'm glad somebody you saw where I was going with that..... Quote Link to comment
Kirden Posted April 1, 2014 Author Report Share Posted April 1, 2014 That is less cryptic than the actual code... Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.