×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

how to get hlookup to output a scalar

how to get hlookup to output a scalar

how to get hlookup to output a scalar

(OP)
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.

RE: how to get hlookup to output a scalar

(OP)
Thanks.  I do set the origin to 1, and of course the answer was hiding right under my nose.   

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources