Good day all
I'm really hoping someone can assist me.
I'm trying to create a calculator using different sets of tariffs.
Basically what happens is i will enter an amount of units consumed.
What the calculator needs to do at the push of a button is calculate the amount owed by breaking the number down and multiplying it by the different tariffs.
e.g
tariff1 = 11.917550 (1st 6units)
tariff2 = 12.151250 (next 4units)
tariff3 = 16.876510 (next 10units)
tariff4 = 21.876960 (next 10units)
tariff5 = 27.454360 (all the units remaining after 30)
if my number is 31units
then the number is broken down as follows:
6units on tariff1
4units on tariff2
10units on tariff3
10units on tariff5
1unit on tariff5 (30+ units will be on tariff5)
i wrote some code on Brackets using JQuery and it works fine, but i don't know how to convert that to VBA:banghead:
Find attached code in .txt
View attachment 65706
I'm really hoping someone can assist me.
I'm trying to create a calculator using different sets of tariffs.
Basically what happens is i will enter an amount of units consumed.
What the calculator needs to do at the push of a button is calculate the amount owed by breaking the number down and multiplying it by the different tariffs.
e.g
tariff1 = 11.917550 (1st 6units)
tariff2 = 12.151250 (next 4units)
tariff3 = 16.876510 (next 10units)
tariff4 = 21.876960 (next 10units)
tariff5 = 27.454360 (all the units remaining after 30)
if my number is 31units
then the number is broken down as follows:
6units on tariff1
4units on tariff2
10units on tariff3
10units on tariff5
1unit on tariff5 (30+ units will be on tariff5)
i wrote some code on Brackets using JQuery and it works fine, but i don't know how to convert that to VBA:banghead:
Find attached code in .txt
View attachment 65706