Greetings all,
I am trying to figure out how to use VBA to perform a small calculation based on cell values.
Let's say I have cells A1, A2 & A3.
A1 = amount in gold coins
A2 = amount in silver coins
A3 = amount in copper coins
100 copper = 1 silver
100 silver = 1 gold
Basically, what I want to do is, IF the number of copper is 100 or greater, then it will add a +1 to the preceding cell, silver. And so on.
So, if a user enters A1=2, A2=120, A3= 210 then the sheet will automatically display:
A1=3, A2=22, A3=10
I hope that makes sense. I have attached a sample table.
In the sample, a user enters a QTY in E3. The total columns to the right will automatically multiply the QTY * coins for G, S & C.
If the copper amount comes out to 250, then I want that 200 to be converted to a +2 to the silver total... or a +3 for 300, etc. Same for silver to gold.
I have tried a couple of different examples found on google, however most of them do not detail how the function is used and I am having a hard time adapting it to what I want it to do.
The values will ONLY be whole numbers, so no decimals or floats are needed.
Any help is greatly appreciated.
Regards.
Bookmarks