Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Inputting Data

Status
Not open for further replies.

digger200

Automotive
Apr 17, 2007
91
0
0
GB
I want to use equations that use data from a table (on the same worksheet would be nice)
So how do I go about it. Imagine my equation for a certain model is 2 x A, where A is situated in the data file (row?) and depends on what type the base model is.


(I can't seem to find what I want in the help files or by using search. I'm probably using the wrong terms)
Thanks
 
Replies continue below

Recommended for you

Put all of the data for each model in a row with the model number in the first column. Then use the INDEX function in your equation to get the value of A.
 
It is also pretty easy to do with lookup functions.

The attached file computes: Y = A + B*t + C*t^2 + D*t^3

where A, B, C, D are different depending on the model (model1, model2, model3, or model4).

The values of A, B, C, D are stored in a table which is named "mtable" (named range).

The values are retrieved from the table using hlookup function.

= hlookup(mtable, lookupvalue, rownumber)
where the model is used as a lookupvalue. The hlookup finds the correct row for the model and reads down the number of rows you tell it to find the correct coefficient.

The second version (labeled "more elegant", but actually a little more complicated) uses match function to determine the correct row number for A, B, C, D)

=====================================
Eng-tips forums: The best place on the web for engineering discussions.
 
 http://files.engineering.com/getfile.aspx?folder=753f969d-41f4-4f67-82bf-d955eabdca0b&file=ModelLookup.xls
Status
Not open for further replies.
Back
Top