Skip to main content
1-Visitor
December 29, 2014
Solved

Create a "vlookup" in MathCAD Prime 3.0?

  • December 29, 2014
  • 6 replies
  • 4079 views

Is it possible to perform a pseudo “vlookup” in MathCAD prime 3.0? Using the attached spreadsheet, I’m attempting to have MathCAD look for a value in the B column (W8x35 for example) and then once it finds it, have MathCAD set variable “rx” equal to value in column AP, “ry” equal to the value in column AT etc. Is this possible with prime 3.0?

Best answer by RichardJ

It's case sensitive. Change the lower case x to an upper case X: W44X335.

Note that the result is returned as a single element vector. If you want a scalar put a subscript (type "[0") after the closing parenthesis.

6 replies

19-Tanzanite
December 29, 2014

Sure. Just use vlookup multiple times, once for rx, once for ry, etc.

Or did I miss something in your question?

dsochor1-VisitorAuthor
1-Visitor
December 29, 2014

Maybe the attached Prime worksheet and excel are better able to show the issue I'm having. I'm attempting to do what you recommend but my defining of variables has an error. Might you know what I am doing incorrect?

19-Tanzanite
December 29, 2014

I see. Using letters as column designators is unique to spreadsheets. Mathcad indexes columns the same way as it indexes rows: using numbers that start at the global variable ORIGIN. By default ORIGIN=0, so column AQ in Excel is column 42 in Mathcad. READEXCEL puts the content of the spreadsheet in the matrix AISC, which you must then index using numbers, not Excel's letter designators.