Round num_digits calculated?
Is it possible to use a formula within the round function to determine the rounding number of digits?
For this application, a suppliers price for any SKU is dependent on the dimensions which can vary widely thus it's easiest to calculate the price. The problem I have is when calculating a supplier's price, most suppliers use a price with four decimals, one uses three, and another uses two.
Initially, I had this which works fine for all but the two that use fewer digits.
=ROUND([price calculation],4)
I tried making a lookup table with the suppliers and their rounding then vlookup in the formula as follows, but I get a #REF! error.
=ROUND([price calculation],VLOOKUP([@Supplier],Round,2))
I tried using an IF, but I get the same #REF! error.
=ROUND([price calculation],IF([@Supplier]="H",2,4))
Anyone have any bright ideas? I have attached the workbook if you dare.
|