Jacc
I agree, this one is tough!
I'm almost embarrassed by the route I got there, but I think this code delivers the outcome desired
it's in two formats, a macro and a user-defined function
in either case you will need to enter the range to evaluate, and the discount rate (as a fraction, ie 0.5)
I have assumed a range with at least three columns, the first being product name, the second the quantities, the third the prices
If the input range is not in this format, it won't work
also, the range must only include the items, not the title rows or total row at the end
Option Base 1 must be at the top of the module
Bookmarks