Ive got a workbook to keep a diet journal that lets me put in a reference number and the quantity of a particular food and up pops all the nutritional info and calculates daily values. Screenshot


Using the following function I am limited to 8 items:
=C27*IF(B27=1,$F$2,IF(B27=2,$F$3,IF(B27=3,$F$4,IF(B27=4,$F$5,IF(B27=5,$F$6,IF(B27=6,$F$7,IF(B27=7,$F$8,IF(B27=8,$F$9,0))))))))

Is there anyway i can extend this to give me a larger number of IF's or another function i can use to accomplish teh same result?