This may have been better to do in VB but that is beyond my feeble skills.
I'm using IF and VLOOKUP to choose an appropriate rate dependent on a variable quantity (in this case, sheets of material run through a variety of printing and associated processes). I've got this formula, long and ugly, but it should work. Paranthenses all seem to match up but when I cut and paste it (from Word, coz I can uses colours to match everything up etc), Excel tell me there is an error, and places the cursor at the end of the second AND test between ProcessTable,7)) and the subsequent comma.
Here's the formula:
=IF($C25<>"", IF(VLOOKUP($C25,ProcessTable,6)=100000, VLOOKUP($C25,ProcessTable,5), IF(AND(SheetsA >=VLOOKUP($C25,ProcessTable,4), SheetsA <VLOOKUP($C25,ProcessTable,6)), VLOOKUP($C25,ProcessTable,5)), IF(AND(SheetsA >=VLOOKUP($C25,ProcessTable,6), SheetsA <VLOOKUP($C25,ProcessTable,8)), VLOOKUP($C25,ProcessTable,7)), IF(SheetsA>=VLOOKUP($C25,ProcessTable,8), VLOOKUP($C25,ProcessTable,9))),”not valid”)
You can see part of the lookup table (ProcessTable) at:
http://www.number64.com.au/temp/excel.htm
Thanks!
Bookmarks