Hey everyone,
Although this account is new I have been around before and ive always gotten good answers and im hoping once again i may get some help.
This question is about how to convert a single line of parameters into slightly different static parameters. I could quite easily create a nested IF formula to dynamically calculate the answers i require but this is intended to create a database to be imported into an antiquated Microsoft Dynamics CRM which requires a series of static integers to calculate upon.
The math is simple.
[TABLE="width: 500"]
<tbody>[TR]
[TD]Minimum Weight[/TD]
[TD]MIN[/TD]
[TD]0[/TD]
[TD]45[/TD]
[TD]100[/TD]
[TD]250[/TD]
[TD]300[/TD]
[TD]500[/TD]
[TD]1000[/TD]
[/TR]
[TR]
[TD]6.266319[/TD]
[TD]246[/TD]
[TD]39.2575[/TD]
[TD]21.115[/TD]
[TD]15.785[/TD]
[TD]0[/TD]
[TD]14.35[/TD]
[TD]13.8375[/TD]
[TD]0[/TD]
[/TR]
</tbody>[/TABLE]
The figures across the top are related as follows.
Minimum Weight = Minimum possible weight for a job
MIN = Minimum possible charge for a job
0 = Rate for jobs between 0 and =<45
45 = Rate for jobs between 45 and =<100
etc
The interesting bit is that for a job that is say, 24KG, the charge would be 942.18. When the weight increases to 25KG the same bracket would make the charge 981.4375.
The charge for 45kg (The bottom of the next bracket) would be 950.175, and because this is less than the same charge for a weight higher than 24.2kg you would want to charge at the 45kg rate (you assume the shipment is then 45kg to reduce your costs).
With this information, a new set of optimal weight brackets can be configured.
In this case it would look like: between 0 and 24.2 at rate 39.2575 and the next bracket would be 24.3 to 45 at 21.115 (with a minimum weight to charge of 45).
This reworked optimal bracketing is what the Database requires.
It would look like this.
[TABLE="width: 500"]
<tbody>[TR]
[TD]Minimum Weight[/TD]
[TD]Maximum Weight[/TD]
[TD]Minimum Weight to Charge[/TD]
[TD]Rate[/TD]
[/TR]
[TR]
[TD]0[/TD]
[TD]24.2[/TD]
[TD]0[/TD]
[TD]39.2575[/TD]
[/TR]
[TR]
[TD]24.21[/TD]
[TD]44.99[/TD]
[TD]45[/TD]
[TD]21.115[/TD]
[/TR]
</tbody>[/TABLE]
So for each line in the existing table there will be 6 new rows for that one configuration.
What i was trying to achieve was a formula that would enable me to run it down a large sheet of 1000+ lines and output the new optimized data set in another sheet that i could then use for importing.
I appreciate that i haven't given a huge amount of info here but its all ive got. I was trying to avoid using VBA to do this. Otherwise i might aswell write a script in C# to do it. However if someone can give direction with the VBA im happy to use that as a solution.
If it would be useful i can also attach a snippet from the DB in question.
Thanks in advance for anyone who has the time to assist me.
Sincerely, Lewis.
Although this account is new I have been around before and ive always gotten good answers and im hoping once again i may get some help.
This question is about how to convert a single line of parameters into slightly different static parameters. I could quite easily create a nested IF formula to dynamically calculate the answers i require but this is intended to create a database to be imported into an antiquated Microsoft Dynamics CRM which requires a series of static integers to calculate upon.
The math is simple.
[TABLE="width: 500"]
<tbody>[TR]
[TD]Minimum Weight[/TD]
[TD]MIN[/TD]
[TD]0[/TD]
[TD]45[/TD]
[TD]100[/TD]
[TD]250[/TD]
[TD]300[/TD]
[TD]500[/TD]
[TD]1000[/TD]
[/TR]
[TR]
[TD]6.266319[/TD]
[TD]246[/TD]
[TD]39.2575[/TD]
[TD]21.115[/TD]
[TD]15.785[/TD]
[TD]0[/TD]
[TD]14.35[/TD]
[TD]13.8375[/TD]
[TD]0[/TD]
[/TR]
</tbody>[/TABLE]
The figures across the top are related as follows.
Minimum Weight = Minimum possible weight for a job
MIN = Minimum possible charge for a job
0 = Rate for jobs between 0 and =<45
45 = Rate for jobs between 45 and =<100
etc
The interesting bit is that for a job that is say, 24KG, the charge would be 942.18. When the weight increases to 25KG the same bracket would make the charge 981.4375.
The charge for 45kg (The bottom of the next bracket) would be 950.175, and because this is less than the same charge for a weight higher than 24.2kg you would want to charge at the 45kg rate (you assume the shipment is then 45kg to reduce your costs).
With this information, a new set of optimal weight brackets can be configured.
In this case it would look like: between 0 and 24.2 at rate 39.2575 and the next bracket would be 24.3 to 45 at 21.115 (with a minimum weight to charge of 45).
This reworked optimal bracketing is what the Database requires.
It would look like this.
[TABLE="width: 500"]
<tbody>[TR]
[TD]Minimum Weight[/TD]
[TD]Maximum Weight[/TD]
[TD]Minimum Weight to Charge[/TD]
[TD]Rate[/TD]
[/TR]
[TR]
[TD]0[/TD]
[TD]24.2[/TD]
[TD]0[/TD]
[TD]39.2575[/TD]
[/TR]
[TR]
[TD]24.21[/TD]
[TD]44.99[/TD]
[TD]45[/TD]
[TD]21.115[/TD]
[/TR]
</tbody>[/TABLE]
So for each line in the existing table there will be 6 new rows for that one configuration.
What i was trying to achieve was a formula that would enable me to run it down a large sheet of 1000+ lines and output the new optimized data set in another sheet that i could then use for importing.
I appreciate that i haven't given a huge amount of info here but its all ive got. I was trying to avoid using VBA to do this. Otherwise i might aswell write a script in C# to do it. However if someone can give direction with the VBA im happy to use that as a solution.
If it would be useful i can also attach a snippet from the DB in question.
Thanks in advance for anyone who has the time to assist me.
Sincerely, Lewis.