You are here:

Excel/Excel Formula Needed

Advertisement


Question
Iím building a spreadsheet where the value of one cell has 6 maybe 8 possibilities which are determined by the values of 2 possibly 3 other cells.
Example:
The value of cell I-5 is determined by the values of cells F-5, G-5 & H-5.
F5 will be 50% or 60%.
G5 will be 1, 2 or 3
H5 will be 1 or 2
I5 will be 672 if F5=50%, G5 =1 and H5=1 or 2*
I5 will be 807 if F5=60%, G5=1 and H5=1 or 2
I5 will be 807 if F5=50% and G5=2 and H5=1 or 2*
I5 will be 807 if F5=50% and G5=2 and H5=1 or 2*
I5 will be 969 if F5=60% and G5=2 and H5=1 or 2*
I5 will be 932 if F5=50% and G5=3 and H5=1 or 2*
I5 will be 1119 if F5=60% and G5=3 and H5=1 or 2*
*Itís possible the value of I5 might be reduced by 25 if the value of H5 is 1 but that hasnít been decided yet.
Can you help?
Thanks,
Mark

Answer
Lookup Table
Lookup Table  
Since there are a finite number of "combinations", you can actually list those combinations in a concatenated list along with the associated value they resolve to.

See the attached picture.

50% is the same 0.5 in Excel.  We can string the values in F5, G5 and H5 together to get a text string like "0.511" or "0.621".  Then we add zero to that string to turn it back into a real number.

Then we can lookup that resulting number in the list we created.

In the picture you see all the combinations listed in column A with the values in column B.  Then we can use the VLOOKUP formula to get the value from the table based on the entries in the cells.

=VLOOKUP((F5&G5&H5)+0,$A:$B, 2, 0)
About Excel
This topic answers questions related to Microsoft Excel spreadsheet (or workbook) stand-alone or Mircrosoft Office Excel including Excel 2003, Excel 2007, Office 2000, and Office XP. You can get Excel help on Excel formulas(or functions), Excell macros, charting in Excel, advanced features, and the general use of Excel. This does not provide a general Excel tutorial nor the basics of using a spreadsheet. It provides specific answers to using Microsoft Excel only. If you do not see your Excel question answered in this area then please ask an Excel question here

Excel

All Answers


Answers by Expert:


Ask Experts

Volunteer


Jerry Beaucaire

Expertise

Excel Formulas, macros, automation. Microsoft Excel MVP - 2010. Code site with free code snippets and techniques: http://sites.madrocketscientist.com/jerrybeaucaires-excelassistant/files

Experience

Microsoft Excel MVP - 2010. I have my own extensive Excel help/code site: http://sites.madrocketscientist.com/jerrybeaucaires-excelassistant/files ===================== I have been offering free assistance as an Excel aid on many web sites for many years: (http://www.excelforum.com - JBeaucaire) ======== (http://www.askmehelpdesk.com/spreadsheets - JBeaucaire) ======= (http://www.mrexcel.com/forum - jbeaucaire)

Education/Credentials
Bachelor's Degree from Azusa Pacific University in Mathematics and Music Composition

Awards and Honors
Microsoft Excel MVP 2010

©2016 About.com. All rights reserved.