Need help making a sum formula filter

I need to make a formula that fallows this format

IF inventory is _____than this much% of a item that needs to be pulled
<20 100%
>20, 50%
>50, 30%

I need to pull virtual locations and items. This is a small example of a sheet i have to work with. But I can only pull so much of one item. I need a way to filter out a subtotal of one item so I don't end up pulling too much of one item. I know there has to be a easier way than tedious process I have been doing it.
Bin Item Quantity
P-5-A853B198 , ZZXY6IUV1R , 1
P-5-A891B226 , ZZXY6IUV1R , 2
P-5-A674B257 , ZZXY6IUV1R , 3
P-5-A772B696 , ZZXY6IUV1R , 1
P-5-A744B915 , ZZXY6IUV1R , 1
P-5-A720B989 , ZZXY6IUV1R , 1
P-5-A907B570 , ZZY05XO9SH , 3
P-5-A600B534 , ZZY05XO9SH , 1
P-5-A949B108 , ZZY05XO9SH , 2
P-6-A325B913 , ZZY05XO9SH , 1
P-5-A728B498 , ZZY05XO9SH , 2
P-5-A687B819 , ZZY05XO9SH , 1
P-5-A199B750 , ZZY05XO9SH , 1
P-5-A994B149 , ZZY05XO9SH , 2
P-6-A032B123 , ZZXS3B9NUX , 1
P-6-A218B038 , ZZXS3B9NUX , 2
P-6-A669B860 , ZZXS3B9NUX , 1
P-6-A309B567 , ZZXS3B9NUX , 1
P-7-A165B110 , ZZXV2FB4AJ , 3
P-7-A165B107 , ZZXV2FB4AJ , 2
P-7-A076B792 , ZZXV2FB4AJ , 2
P-7-A137B635 , ZZXV2FB4AJ , 2
P-7-A477B879 , ZZXV2FB4AJ , 2
P-7-A426B373 , ZZXV2FB4AJ , 2
P-7-A402B841 , ZZXV2FB4AJ , 2
P-7-A402B840 , ZZXV2FB4AJ , 2
P-7-A381B471 , ZZXV2FB4AJ , 1
P-7-A381B472 , ZZXV2FB4AJ , 1
P-7-A426B374 , ZZXV2FB4AJ , 1
P-7-A544B635 , ZZXV2FB4AJ , 1
P-7-A402B839 , ZZXV2FB4AJ , 1
P-7-A162B398 , ZZXV2FB4AJ , 1
P-7-A260B477 , ZZXV2FB4AJ , 1
P-7-A260B475 , ZZXV2FB4AJ , 1
P-7-A162B395 , ZZXV2FB4AJ , 1
P-7-A137B638 , ZZXV2FB4AJ , 1
P-7-A138B994 , ZZXV2FB4AJ , 1
P-6-A911B057 , ZZXV2FB4AJ , 1
P-7-A381B474 , ZZXV2FB4AJ , 1
P-7-A492B508 , ZZXV2FB4AJ , 1
P-7-A477B880 , ZZXV2FB4AJ , 1
P-7-A685B107 , ZZXV2FB4AJ , 1
P-7-A701B599 , ZZXV2FB4AJ , 1
P-7-A685B109 , ZZXV2FB4AJ , 1
P-7-A828B971 , ZZXV2FB4AJ , 1
P-7-A801B710 , ZZXV2FB4AJ , 1
P-7-A927B159 , ZZXV2FB4AJ , 1
P-7-A927B160 , ZZXV2FB4AJ , 1
P-7-A894B148 , ZZXV2FB4AJ , 1
P-7-A894B149 , ZZXV2FB4AJ , 1
P-7-A894B150 , ZZXV2FB4AJ , 1