Forum Discussion
Sebastian Lyngra
Jul 30, 2018Copper Contributor
Sold items in storage
I want to know how many Sold items that are still inn storage.
Colum B shows how many items of each model is in storage.
Colum C shows how many items of each model is sold.
Somthimes we have 1 in storage but sell 2, the count should then say that there is 1 sold in storage.
What kind of formula or macro must i use to get this right? Please help me, this has been bugging me for a year.
2 Replies
- SergeiBaklanDiamond Contributor
Hi Sebastian
That could be array formula
=SUM(IF($B$2:$B$7<=$C$2:$C$7,$B$2:$B$7,$C$2:$C$7))
or regular one
=SUMPRODUCT(($B$2:$B$7<=$C$2:$C$7)*$B$2:$B$7+$C$2:$C$7*($B$2:$B$7>$C$2:$C$7))
Attached
- Sebastian LyngraCopper Contributor
Thank you so mutch! :-D It helped alot!