Pencil Shavings

Friday, October 21, 2005

My excel file is a work of art

Prices:

Less than 20 -- $6
20 - 99 -- $6 (For every 20, 1 free)
100 - 499 -- $6 (For every 100, 10 free)
More than 500 -- $5

Because of the limit of a maximum of 7 nested variables in an IF formula, i.e. IF(A1>499,0,IF(A1>399,40,)) etc., vlookup had to be used.

The vlookup table was not pretty, but it did the job.

So now all you have to do is to put in the orders and the excel file will spit out the required number of free copies, as well as the bill to send to them.

Life would have been a lot easier (and more boring) if the marketing folks decided to simply give 5%, 10% and 15% off accordingly.

1 comment:

colinrt said...

ooh... nice... i am duly impressed...