Hi there
I do apologise if this is a rather noobie question but I've been given a piece of VBA code and I'm completely failing to work out how to adapt it to my needs.
The code is designed to work out the total cost to the customer for buying various quantities of a single product. The price scale works that the first 5 are x price the next 5 are at a slightly cheaper rate, next 5 cheaper again etc.
So as an example the per unit price for 5 units is 30, the next 5 (per unit) are 24, next 5 are 20. So the purchase of 12 units would cost 5x30 + 5x24 + 2x20 (310)
The vb code I have is:
So this does the correct calculation but is hard coded to check the value from L10 and place the result in M10. This formula is going to be used on multiple sheets so each sheet will be checking a different cell and writing to a different cell.
From what I was reading it sounded like using this as a function might be the solution but I'm not at all sure if that's right or indeed possible. Any help would be very appreciated.
Bookmarks