# Formula to allocate stock to different stores based on the Minimums set by the business

1. ## Formula to allocate stock to different stores based on the Minimums set by the business

Hi

I am looking for a formula to do the below in Excel

For Eg:

I have 10 Apples in the business
8 stores
Each store minimum Qty is varies from 2 to 4
so I want to allocate 10 apples to stores based on the ranking ( already arranged in such a way )
if store A has min of 4 , B has 3 and C &D has 2 each and E , F G and H has 1 each - in total I need 15 pcs. but i have only 10.
So of course store A will get 4 , B will get 3 and C will get 2 - I need to allocate balance 1 to D and rest all stores will be zero.

attached the workbook.

Column C5 - Total Available
D5 to K 5 - Allcoation Qty needed here
D3 to K3 - Min to allocate.

2. ## Re: Formula to allocate stock to different stores based on the Minimums set by the busines

D15 =IF(\$C\$5-SUM(\$C\$3:D3)>=0,D\$3,\$C\$5-SUM(\$C\$15:C\$15)) and drag to the right.

There are currently 1 users browsing this thread. (0 members and 1 guests)

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1