Multi =IF formula with ROUNDDOWN and separate QTY's

PuntingJawa

Board Regular
Joined
Feb 25, 2021
Messages
158
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
I would like to try a couple of functions along the lines of the following but no matter what combination I can't seem to get it to work due to lack of knowledge on patterns and restrictions of =IF formula combinations. So I am open to suggestions and changes.

1. If C4 is positive subtract that amount from 1272. The remaining gets divided by G4 which should leave the quantity or less than H4 has.
If the final is even then half would show in I4 and half in J4.
If odd then the even half to I4 and the odd to J4.
If the item has a decimal, I would like to round down to the nearest whole.

2. If C4 is negative it should show zero in I4/J4.

Are my criteria viable or are there other formulas that would be better suited to what I am trying t accomplish?

Book2
BCDEFGHIJKLMN
2REQ TotalReq PerQTY
3
42521020XX42633XXXX
501020XX44000XXXX
670950127212727010.50.500
71560-610662127265247.3076927.307692-4.83077
896-706-44122896100
Sheet1
Cell Formulas
RangeFormula
I4:I5I4=IF(C4<0,0,B4/G4/2)
J4:J5J4=IF(C4<0,0,B4/G4/2)
C4C4=1272-B4
C5:C8C5=C4-B5
D6:E6D6=IF(C6>0,0,C6)+1272
D7:E8D7=IF(C7>0,0,C7)+D6
I6I6=IF(C5<0,0,B6/G6/2)
J6J6=IF(C5<0,0,B6/G6/2)
K6K6=IF(D6>0,0,D6/G7/2)
L6L6=IF(D6>0,0,D6/G7/2)
I7I7=IF(C6<0,0,C6/G7/2)*ROUNDDOWN(1,1)
J7:J8J7=IF(C6<0,0,C6/G7/2)
K7K7=IF(D6<0,0,D6/G7/2)-(I7+J7)
I8I8=IF(C7<0,0,C7/G7/2)
Cells with Conditional Formatting
CellConditionCell FormatStop If True
E4:E8Cell Value<0textNO
E4:E8Cell Valuebetween 0 and 9999textNO
D4:D8Cell Value<0textNO
C4:C8Cell Value<0textNO
D4:D8Cell Valuebetween 0 and 9999textNO
C4:C8Cell Valuebetween 0 and 9999textNO
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
I've gotten a lot closer on my own. I'm now presented with 2 issues.
The first, as the title says, is utilizing the "ROUNDDOWN" function to round down to the nearest whole. I cannot fathom where to place it to make this work, But I am closer.
The second, is fixing my string formula to not allow negatives in the I4-I8 through K4-K8 ranges. If they are negative then it should be 0.
Truck load practice formula.xlsx
BCDEFGHIJK
2REQ TotalReq PerQTY
3
42521020XX4266XX
501020XX4400XX
67095012721272701101
71560-610662127265245.23076913.538465.230769
896-706-441228961-13.708320.14583-5.4375
9
10
11
121272
Sheet1
Cell Formulas
RangeFormula
C4C4=1272-B4
C5:C8C5=C4-B5
I4I4=IF(C4>0,H4,IF(C4>0,(B12+C4)/G4))
I5:I8I5=IF(C5>0,H5,IF(C5<0,(C4+C5)/G5))
D6:E6D6=IF(C6>0,0,C6)+1272
D7:E8D7=IF(C7>0,0,C7)+D6
J6J6=IF(C6>0,H6,IF(C5>0,(B12+C6)/G6))-I6
K6K6=IF(E6>0,H6,IF(E6>0,B12+E6/G6))
J7:J8J7=IF(D7>0,H7-I7,IF(D7<0,(D6+D7)/G7))-I7
K7K7=IF(E7>0,H7-J7-I7,IF(E7>0,B12+E7/G7))
K8K8=IF(E8>0,H8-J8-I8,IF(E8>0,B12+E8/G8))
Cells with Conditional Formatting
CellConditionCell FormatStop If True
E4:E8Cell Value<0textNO
E4:E8Cell Valuebetween 0 and 9999textNO
D4:D8Cell Value<0textNO
C4:C8Cell Value<0textNO
D4:D8Cell Valuebetween 0 and 9999textNO
C4:C8Cell Valuebetween 0 and 9999textNO
 
Upvote 0
I've worked a little more on this. Instead of simply saving space, I decided to move the string data to one set of cells and make "Actual remaining" cells as the Rounddown and quantity check. Everything looks like it worked.
Can someone please check over my work and let me know if I did this correctly and if there are any improvements that can be made? I feel like the string data section is where there may be some errors, but as for the data I am working with for an example, the formulas seem OK.

Book1
ABCDEFG
1
2Available
3Req PerQTYREQ Total1272
44262521020XX
544001020XX
67017095012721272
765241560-6106621272
896196-706-441228
9
10Actual remainingQTY Check
11Row 1Row 2Row 3G/B
126XXGood
130XXGood
14100Good
1514100Good
16001Good
17
18
19String Data
20Row 1Row 2Row 3
216XX
220XX
23100
2414.615384610.18461540
25001
26
Sheet1
Cell Formulas
RangeFormula
E4E4=1272-D4
E5:E8E5=E4-D5
F6F6=IF(E6>0,0,E6)+E3
G6G6=IF(F6>0,0,F6)+E3
F7:G8F7=IF(E7>0,0,E7)+F6
B12:B13,B14:D16B12=ROUNDDOWN(B21,0)
F12:F14F12=IF(B12=C4,"Good","Bad")
F15:F16F15=IF(B15+C15+D15=C7,"Good","Bad")
B21:B24B21=IF(D4<E3,C4,IF(D4>E3,E3/B4))
C23C23=IF(B23=C6,0,IF(D6<E3,C6,IF(D6>E3,E3/B6)))
D23D23=IF(C23<C6,0,IF(D6<E3,C6,IF(D6>E3,E3/B6)))
C24C24=IF(E7<0,F7/B7,0)
D24D24=IF(G7<0,G7/B7,0)
B25B25=IF(D8<E7,C8,IF(D8>E7,0))
C25C25=IF(E8>F8,F8/B8,0)
D25D25=IF(F8<G7,C8,0)
Cells with Conditional Formatting
CellConditionCell FormatStop If True
F12:F16Cell Valuecontains "Bad"textNO
F12:F16Cell Valuecontains "Good"textNO
 
Upvote 0

Forum statistics

Threads
1,223,886
Messages
6,175,198
Members
452,616
Latest member
intern444

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