A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
Hi Monika,
A couple of different ways you could tackle a 0% price increase in B6:
- Extend the lookup table so the first row is 0% (price inc) 0% (quant dec)
And amend the lookup range in the formula to A9:B16
- Amend the formula to check first for 0% in B6, something like:
=IF(B6=0,B5*B3,(100%+VLOOKUP(B6,A9:B15,1,FALSE))*B5*(100%-VLOOKUP(B6,A9:B15,2,FALSE))*B3)
- If you want to use IFERROR then amend the formula something like:
=IFERROR((100%+VLOOKUP(B6,A9:B15,1,FALSE))*B5*(100%-VLOOKUP(B6,A9:B15,2,FALSE))*B3,B5*B3)
I should have added last time that the problem with the original formula was that the multiplication (of B5 and B3) was occurring before the addition/subtraction - for more information on calculation operators and their order of precedence see this help page: http://office.microsoft.com/en-us/excel-help/calculation-operators-and-precedence-HP010342223.aspx
********* EDIT **********
I also meant to add that in the original formula you don't really need the first of the 2 Vlookup's because it's just returning the same value as it's looking up - so the formula can be re-written as:
=(100%+B6)*B5*(100%-VLOOKUP(B6,A9:B15,2,FALSE))*B3
____________
Regards, Tom