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!

how to get hlookup to output a scalar

Status
Not open for further replies.

bkrell

Structural
Nov 17, 2010
6
0
0
US
I'm trying to get the hlookup function to output a value of a matrix given a string or value to match in a header row, the lookup matrix, and known row number. i.e.

seed:= "ex"

R: [0 "ex" 1
2 3 4
5 6 7]

As I have it written now, MathCAD outputs

solution:= hlookup(seed,R,2)= (3)

I would like hlookup(seed,R,2) to output the just scalar value of the matrix entry instead of the vector. Is there a setting or another function to "scalarize" the output? The vlookup() function has the same issue. I'd like to use hlookup or vlookup, so the seed can be a prompted string or value.

Thanks for any help.
 
Replies continue below

Recommended for you

Status
Not open for further replies.
Back
Top