4 Barrel Harold
New Member
- Joined
- Jun 15, 2018
- Messages
- 21
Excel 2010 32 bit | ||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z | AA | AB | AC | AD | AE | AF | |||
1 | Main Length | Max Length | ||||||||||||||||||||||||||||||||
2 | 50 | 382.0 | ||||||||||||||||||||||||||||||||
3 | ||||||||||||||||||||||||||||||||||
4 | ||||||||||||||||||||||||||||||||||
5 | ||||||||||||||||||||||||||||||||||
6 | ||||||||||||||||||||||||||||||||||
7 | ||||||||||||||||||||||||||||||||||
8 | Main Length | Section Lengths | Top | Bottom | Final Result | |||||||||||||||||||||||||||||
9 | 50 | e | 0 | 0 | 0 | 382 | 0.0 | |||||||||||||||||||||||||||
10 | 50 | d | 3320 | 0 | 0 | 382 | 0.0 | |||||||||||||||||||||||||||
11 | 50 | c | 245 | 0 | 0 | 382 | 0.0 | |||||||||||||||||||||||||||
12 | 50 | b | 828 | 0 | 45 | 382 | 377.0 | MAX(0,IF(NOT(OR(H12H12,A12-H12,G12),IF(SUM(G12:G42)>R12,((G12-(G12-R12)-SUM(G13:G40)))))) | ||||||||||||||||||||||||||
13 | 50 | a | 5 | 45 | 50 | 382 | 5.0 | |||||||||||||||||||||||||||
14 | 50 | |||||||||||||||||||||||||||||||||
Sheet1 (2) |
Cell Formulas | ||
---|---|---|
Range | Formula | |
A12 | =IF(OR(ISBLANK(G12)),"",A11) | |
H12 | =IF(OR(ISBLANK(G11)),"",MAX(0,IF(NOT(OR(A12G9:G50))),IF(SUM(G13:G50)G12:G50),H11+G11),G11-(SUM(G11:G50)-A11)))) | |
I12 | =IF(OR(ISBLANK(G12)),"",MAX(0,IF(NOT(OR(A13G10:G51))),IF(SUM(G14:G51)G13:G51),H12+G12),G12-(SUM(G12:G51)-A12)))) | |
R12 | =IF(OR(ISBLANK(G12)),"",R11) | |
S12 | =MAX(0,IF(NOT(OR(H12)),IF(SUM(G12:G42)>H12,A12-H12,G12),IF(SUM(G12:G42)>R12,((G12-(G12-R12)-SUM(G13:G40)))))) |
Ok I’m by no means a computer programmer, so here is my problem. In this calculation I need the final result total to max out at 382, but if the Main length drops below the Maximum length the final result will not exceed the Main length when totaled, Confused yet ” I AM “ this is why I’m asking the experts LOL I have also included a screenshot of my calculation problem for the bigger picture. Any streamline of this code will be greatly appricated Thank 4-Barrel Harold
I need help with the Formula In Cell S12
=MAX(0,IF(NOT(OR(H12H12,A12-H12,G12),IF(SUM(G12:G42)>R12,((G12-(G12-R12)-SUM(G13:G40))))))