apply an equation over a excel file using python -- 2
Budget: $10 – $30 USD
The objective of the code is to fill GREEN cells in the spreadsheet named io3, following a rule that will be explained below.
1. For every cell in column B that has a value, for example, P-20, P-25, and so on
1.1 For every value in title line, for example, MSG-RO, PLAEN-NA, and so on
find in the spreadsheet named "inv", the match point. I mean:
if I am in the line of P50, for example, so code will find P-50 to MSG-RO in inv.
Take a look and find yourself.
it is in column "ao", isn't it?
once code has located this column, it will need to do the followin calculation:
(first value in line of P50) - (A x B x C - D x E x F)/1000
where
A = value in column AO, line 5
B = value in column AO, line 9
C = value relative to P50 in the pack in blue, column AO
D = value in column AO, line 6
E = value in column AO, line 10
F = value relative to P50 in the pack in yellow, column AO
note: (first value in line of P50) is the number in column C.
doing all this code should find the number in cell D9, which is related to P50 and MSG-RO.
Next point in this line follows the same rule: find out the column in inv related to the branch MSG-RO to PLAEN-NA
(second value in line of P50) - (A x B x C - D x E x F)/1000
now
A = value in column ---, line 5
B = value in column ---, line 9
C = value relative to P50 in the pack in blue, column ---
D = value in column ---, line 6
E = value in column ---, line 10
F = value relative to P50 in the pack in yellow, column ---
note the source values in "inv" contains equations, which must be kept right there.
note that IO(3) contains drawings, that must be kept right there.
1. For every cell in column B that has a value, for example, P-20, P-25, and so on
1.1 For every value in title line, for example, MSG-RO, PLAEN-NA, and so on
find in the spreadsheet named "inv", the match point. I mean:
if I am in the line of P50, for example, so code will find P-50 to MSG-RO in inv.
Take a look and find yourself.
it is in column "ao", isn't it?
once code has located this column, it will need to do the followin calculation:
(first value in line of P50) - (A x B x C - D x E x F)/1000
where
A = value in column AO, line 5
B = value in column AO, line 9
C = value relative to P50 in the pack in blue, column AO
D = value in column AO, line 6
E = value in column AO, line 10
F = value relative to P50 in the pack in yellow, column AO
note: (first value in line of P50) is the number in column C.
doing all this code should find the number in cell D9, which is related to P50 and MSG-RO.
Next point in this line follows the same rule: find out the column in inv related to the branch MSG-RO to PLAEN-NA
(second value in line of P50) - (A x B x C - D x E x F)/1000
now
A = value in column ---, line 5
B = value in column ---, line 9
C = value relative to P50 in the pack in blue, column ---
D = value in column ---, line 6
E = value in column ---, line 10
F = value relative to P50 in the pack in yellow, column ---
note the source values in "inv" contains equations, which must be kept right there.
note that IO(3) contains drawings, that must be kept right there.