cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X

How to use VLOOKUP related to a table in MATHCAD Prime

Ramakr56
6-Contributor

How to use VLOOKUP related to a table in MATHCAD Prime

Hi Every one

In MathCAD 15 I was able to use vlookup referred to the tables inside the worksheet

because any table has a specific name but because in Mathcad Prime there is no name related to table I can not do that at all

I do know How to can do the the same in Prime without using excel

I do not like using excel entire worksheet because every time you have to double click on it & going to another program in fact , it is also take unnecessarily time,

It would be your kind if you find any solution in this regards except using Matrix

Mathcad 15 Tables.png

5 REPLIES 5

I don't understand your question. Your picture shows part of a Mathcad 15 worksheet and all I see here could be done the very same way in Prime, too.

A "table" in Mathcad (15 or below) always is and was a simple matrix - the "tables" G and H you show are matrices. So what do you mean by "except using matrix"?

In Prime there was introduced a way to define a number of vectors in a display they named "table". Its quite unusable for larger data you import as you can fill those table only manually. Basically when you use that tables you have column headers which are the names of the vectors you create.

If you have created that kind of table instead of your matrix G and if you named the columns in that table Gcol1, Gcol2, Gcol3, etc (you sure would chose other names), then you can use

lookup(LFRS,Gcol1,Gcol3)[1

instead of

vlookup(LFRS,G,3)[1

Looks like you have changed ORIGIN from default 0 to 1.

Ramakr56
6-Contributor
(To:Werner_E)

Hi Werner!

Thanks for your time & answer

it seems I could not show what exactly I am looking for , I tried to attach two new image, as you see here in mathcad 15 we can easily use VLOOKUP

but as you can see I can not do the the same in MathCad prime because  tables in the prime does not have any name so I can not define second parameter of

vlook up in there....

Vlook up 15.jpg                                    Vlook up Prime.jpgjavascript:;

nas0k
7-Bedrock
(To:Ramakr56)

You used a table in Prime. Not the same as an matrix:

I hope this helps.

I think I understood your question pretty well but adding an example always is a good idea.

A table in Prime just look  like one single entity similar to a matrix but it isn't. You had written yourself that you are missing a (variable) name for a table. The reason is that a table is nothing more than a nice display for a bunch of single vectors.

In your table you have defined two vectors with the name a and b (the column headers I was talking about in my first answer. So you could use my suggestion:

"lookup" does exactly what "vlookup" does in the matrix approach. It looks for "C" in vector a and returns the corresponding value from vector b.

What you define with your table are just two vectors and you could as easily have written

to achieve the very same, but less pretty and less compact.

So if you define a second table and again use "a" as column header/vector name, you overwrite the previous one - its just a normal variable, nothing which is "inside" the table and protected. I guess Primes tables are a much simpler concept as you might have thought.

In Mathcad 15, when you chose Insert->Data->table then a matrix is created.

In Prime when you insert a table then a number of single column vectors is created.

Ramakr56
6-Contributor
(To:Werner_E)

Thanks Werner

I Got it, Perfect answer,

Thanks a lot

Top Tags