soh to order qty calculation

Paul_au

New Member
Joined
Apr 11, 2022
Messages
3
Office Version
  1. 365
Platform
  1. Windows
Hi all, I know this is a very simple solution, I'm just a bit rusty on my excel and can't find the answer.
It is a very similar problem as the question in this previous topic

I have a set of data that is itemised by order number and sku and every line pulls our current SOH for the sku
Where items repeat, SOH may not be sufficient to fulfil the order - I need to identify orders that are good to go.
Partial supply is okay example if we have 8 units on hand and order is for 10, we can partial supply the 8

book1.xlsx
ABCD
1IDskuQTY orderedSOH
2Order 1sku112
3Order 2sku213
4Order 3sku213
5Order 4sku312
6Order 5sku411
7Order 6sku513
8Order 7sku312
9Order 8sku312
10Order 9sku312
11Order 10sku312
12Order 11sku611
13Order 12sku711
14Order 13sku811
15Order 14sku912
16Order 15sku912
17Order 16sku411
18Order 17sku1011
19Order 18sku1011
20Order 19sku1121
21Order 20sku1211
22Order 21sku1312
23Order 22sku1312
24Order 23sku1312
25Order 24sku14204
26Order 25sku312
27Order 25sku152126
28Order 25sku162123
29Order 25sku172149
30Order 25sku18597
31Order 25sku19108700
32Order 25sku2020307
33Order 25sku2110692
34Order 25sku2220705
35Order 25sku23133
36Order 25sku24517
Sheet1
Cells with Conditional Formatting
CellConditionCell FormatStop If True
D2:D36Cell Value<0textNO
D2:D36Cell Value>0textNO
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
Column E = qty already assigned to previous orders, so no longer in SOH
Map4 (version 1).xlsb
ABCDEF
1IDskuQTY orderedSOHalready assigned(partial) supply
2Order 1sku11201
3Order 2sku21301
4Order 3sku21311
5Order 4sku31201
6Order 5sku41101
7Order 6sku51301
8Order 7sku31211
9Order 8sku31220
10Order 9sku31230
11Order 10sku31240
12Order 11sku61101
13Order 12sku71101
14Order 13sku81101
15Order 14sku91201
16Order 15sku91211
17Order 16sku41110
18Order 17sku101101
19Order 18sku101110
20Order 19sku112101
21Order 20sku121101
22Order 21sku131201
23Order 22sku131211
24Order 23sku131220
25Order 24sku1420404
26Order 25sku31250
27Order 25sku15212602
28Order 25sku16212302
29Order 25sku17214902
30Order 25sku1859705
31Order 25sku19108700010
32Order 25sku2020307020
33Order 25sku2110692010
34Order 25sku2220705020
35Order 25sku2313301
36Order 25sku2451705
37
Blad1
Cell Formulas
RangeFormula
E2:E36E2=SUMIFS($C$1:C1,$B$1:B1,B2)
F2:F36F2=MAX(0,MIN(C2,D2-E2))
Cells with Conditional Formatting
CellConditionCell FormatStop If True
C2:C36Expression=$C2<>$F2textNO
 
Upvote 0
Column E = qty already assigned to previous orders, so no longer in SOH
Map4 (version 1).xlsb
ABCDEF
1IDskuQTY orderedSOHalready assigned(partial) supply
2Order 1sku11201
3Order 2sku21301
4Order 3sku21311
5Order 4sku31201
6Order 5sku41101
7Order 6sku51301
8Order 7sku31211
9Order 8sku31220
10Order 9sku31230
11Order 10sku31240
12Order 11sku61101
13Order 12sku71101
14Order 13sku81101
15Order 14sku91201
16Order 15sku91211
17Order 16sku41110
18Order 17sku101101
19Order 18sku101110
20Order 19sku112101
21Order 20sku121101
22Order 21sku131201
23Order 22sku131211
24Order 23sku131220
25Order 24sku1420404
26Order 25sku31250
27Order 25sku15212602
28Order 25sku16212302
29Order 25sku17214902
30Order 25sku1859705
31Order 25sku19108700010
32Order 25sku2020307020
33Order 25sku2110692010
34Order 25sku2220705020
35Order 25sku2313301
36Order 25sku2451705
37
Blad1
Cell Formulas
RangeFormula
E2:E36E2=SUMIFS($C$1:C1,$B$1:B1,B2)
F2:F36F2=MAX(0,MIN(C2,D2-E2))
Cells with Conditional Formatting
CellConditionCell FormatStop If True
C2:C36Expression=$C2<>$F2textNO
Thank you - I've implemented that into my real data and it looks to be perfectly correct.
I do have 500+ lines and 45 columns in the document so will take some time to validate in full.
So far, so good :)
 
Upvote 0
Hi,

If I understand correctly, here's another approach:

Book3.xlsx
ABCDE
1IDskuQTY orderedSOH
2Order 1sku112Good
3Order 2sku213Good
4Order 3sku213Good
5Order 4sku312Good
6Order 5sku411Good
7Order 6sku513Good
8Order 7sku312Good
9Order 8sku312Bad
10Order 9sku312Bad
11Order 10sku312Bad
12Order 11sku611Good
13Order 12sku711Good
14Order 13sku811Good
15Order 14sku912Good
16Order 15sku912Good
17Order 16sku411Bad
18Order 17sku1011Good
19Order 18sku1011Bad
20Order 19sku1121Good
21Order 20sku1211Good
22Order 21sku1312Good
23Order 22sku1312Good
24Order 23sku1312Bad
25Order 24sku14204Good
26Order 25sku312Bad
27Order 25sku152126Good
28Order 25sku162123Good
29Order 25sku172149Good
30Order 25sku18597Good
31Order 25sku19108700Good
32Order 25sku2020307Good
33Order 25sku2110692Good
34Order 25sku2220705Good
35Order 25sku23133Good
36Order 25sku24517Good
Sheet1096
Cell Formulas
RangeFormula
E2:E36E2=IF(SUMIF(B$1:B1,B2,C$1:C1)<D2,"Good","Bad")
 
Upvote 0
Solution
Thanks to both of you for the answers, they both work and either is acceptable for the task.
For the purpose of my application, a single column is going to be a better fit.

I like the first answer for the additional data it provides and would be useful in a few other scenarios I can already think of so it won't go to waste.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top