Scheduling formula

mdean32

New Member
Joined
Jan 15, 2019
Messages
22
All 4 cells are using the TRIM function from other workbooks. I need H Rod QTY to subtract the Open QTY from the Total QTY each time the specific Rod Manufactured comes up on the schedule.

The 2nd part is, after getting the above, how could this function calculate by the earliest date first, over a 5 day period, with multiple departments running the same Rods Manufactured?

The 2nd part may not be doable, that's ok. I can make it work with the first question. Thanks


Open QtyRod ManufacturedH Rod QtyTotal qty
8001166H62A07750 9765
10001166H62A07750 9765
15001166H62A07750 9765
10001166H62A07750 9765
3001166H62A12125 4019
29001166H62A12125 4019

<colgroup><col><col><col><col></colgroup><tbody>
</tbody>


<tbody>
</tbody>
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
Hi,

Your "Total qty", is that supposed to be a Running Total?
 
Upvote 0
No, the Total QTY is the inventory on hand at the beginning of the schedule. H Rod Qty will be the running total per Rod Manufactured.
 
Upvote 0
So the Total qty is supposed to Stay unchanged as you have it?

If that's the case:


Book1
ABCD
1Open QtyRod ManufacturedH Rod QtyTotal qty
28001166H62A0775089659765
310001166H62A0775079659765
415001166H62A0775064659765
510001166H62A0775054659765
63001166H62A1212537194019
729001166H62A121258194019
Sheet477
Cell Formulas
RangeFormula
C2=D2-SUMIF(B$2:B2,B2,A$2:A2)


Formula copied down.
 
Last edited:
Upvote 0
There must be something wrong with my cells. The Open Qty, Rod Manufactured, and the Total qty are all trimmed from 3 different worksheets. I assume this is messing up the H Rod Qty column formula. I have tried different functions, and the H Rod Qty always returns the total qty value. Thank you so much for helping.


Open QtyRod ManufacturedH Rod QtyTotal qty
8001166H62A0775097659765
10001166H62A0775097659765
15001166H62A0775097659765
10001166H62A0775097659765
3001166H62A1212540194019
29001166H62A1212540194019

<colgroup><col><col><col><col></colgroup><tbody>
</tbody>
 
Upvote 0
When you say the values are from a TRIM formula, it sounds like the values are Extracted from a Text string, is that correct?

If it is, can you show That formula.
 
Upvote 0
Absolutely! Thank you so much


Open QtyRod ManufacturedH Rod QtyTotal qty
=TRIM([rods.xlsm]Sheet1!F15)=TRIM([rods.xlsm]Sheet1!G15)=I15-SUMIF(G$2:G15,G15,F$2:F15)=IFERROR(VLOOKUP(G15,[inv.xlsm]Sheet1!$A:$C,3),"")
=TRIM([rods.xlsm]Sheet1!F16)=TRIM([rods.xlsm]Sheet1!G16)=I16-SUMIF(G$2:G16,G16,F$2:F16)=IFERROR(VLOOKUP(G16,[inv.xlsm]Sheet1!$A:$C,3),"")
=TRIM([rods.xlsm]Sheet1!F17)=TRIM([rods.xlsm]Sheet1!G17)=I17-SUMIF(G$2:G17,G17,F$2:F17)=IFERROR(VLOOKUP(G17,[inv.xlsm]Sheet1!$A:$C,3),"")
=TRIM([rods.xlsm]Sheet1!F18)=TRIM([rods.xlsm]Sheet1!G18)=I18-SUMIF(G$2:G18,G18,F$2:F18)=IFERROR(VLOOKUP(G18,[inv.xlsm]Sheet1!$A:$C,3),"")
=TRIM([rods.xlsm]Sheet1!F19)=TRIM([rods.xlsm]Sheet1!G19)=I19-SUMIF(G$2:G19,G19,F$2:F19)=IFERROR(VLOOKUP(G19,[inv.xlsm]Sheet1!$A:$C,3),"")
=TRIM([rods.xlsm]Sheet1!F20)=TRIM([rods.xlsm]Sheet1!G20)=I20-SUMIF(G$2:G20,G20,F$2:F20)=IFERROR(VLOOKUP(G20,[inv.xlsm]Sheet1!$A:$C,3),"")

<colgroup><col><col><col><col></colgroup><tbody>
</tbody>
 
Upvote 0
Ok, you're Not extracting the values from a "longer/larger" text string, so I'm assuming you're using TRIM due to Leading/Trailing spaces in the Cells that you're extracting From the other sheets.

Try this, update your Open Qty formula as follows by adding +0 at the end:


Book1
A
10Open Qty
11=TRIM([rods.xlsm]Sheet1!F15)+0
Sheet477
 
Last edited:
Upvote 0
You're welcome, welcome to the forum, glad it sorted out.

BTW, just noticed you adjusted my "H Rod Qty" formula Cell references to match your data, looks like your data starts at Row 15, so change:

=I15-SUMIF(G$2:G15,G15,F$2:F15)

To:

=I15-SUMIF(G$15:G15,G15,F$15:F15)

To avoid future complications.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,006
Messages
6,122,666
Members
449,091
Latest member
peppernaut

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