i need some / alot of help with an excel formula please.

Currently we charge our customers a standard rate per unit of the product sold, irrespective of how many units are sold.

We are looking to move over to a pricing system whereby the price reduces the more units you buy. for example, the first 10 units you buy you pay R 10 per unit. for the next 10 units you buy you pay R 9 for those 10 units (you still pay R 10 for the first 10 units).

Of course, it is possible to buy 12 units, they are not sold in bundles of 10!

I am guessing I need some sort of IF statement, but have no idea what. lets assume that the units starts in A1 and go horizontally with the price in B1 also going horizontally

Anyone able to assist me? I have over 7500 customers and I need to be able to find a point where we can set both the units and the price for those units.