Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

Excel comands on MathCAD

Status
Not open for further replies.

Diquan

Civil/Environmental
Dec 30, 2002
90
Hi!, i have a few questions:

1)I would like to use the command "vlookup" o "hlookup" on MathCAD, is there any way to put or use that on MathCAD?

2)In Excel if a put an answer, lets say:

="Use "&A1&" feet diameter bolt"

(where A1 is the cell that contains a number)

Now, how can i make that with MathCAD?


Thanks for any help!! :)
 
Replies continue below

Recommended for you

Q2 - Use the text string "Bolt diameter required:" and then add after it varname= where varname is the name of the variable used for the bolt diameter. If you have defined all your variables using units, then the unit (inches, feet, whatever) will be added automatically.

You could insert a math region in the middle of the text string, but I find that it makes editing and future maintenance of the worksheet harder.

Q1 - I think you may have to write your own function to extract data from an array, using the in-built array indexing functions, if your data is table-based like Excel. Or just use an Excel component in Mathcad, and do all the lookup things inside it.


Bung
Life is non-linear...
 
I just checked the manual - mathcad does have hlookup(), vlookup(), lookp() and match() functions, and they work very much like Excel's.

Bung
Life is non-linear...
 
Q1 - Solved!

Q2 - I don't see it, can you put a expression to see? because as i understand you are saying that will end up something like this:

--> The answer is:

Bolt:=0.25in (let's say i put this inside an area so it won't show)

--> Now at the end of the sheet is this:

"Use this type of bolt" Bolt=0.25in

Is that what you're saying?? because i found that i can put the variable inside of the text, but still the word Bolt will still appear, like this:

"Use Bolt=0.25in diameter"

The thing is that i don't want the word Bolt to show, i just want:

"Use 0.25in diameter"

Is there a way to do that?? if not is ok, no problem.

==========================================================

Now i have a 3rd question:

In Excel i can use the command CHOOSE to choose a value from a list or something. Now i try searching in the help and every where for the CHOOSE command but i didn't found anything. This command exists in MathCAD?
 
Sure, use one of the user variable types with an invisible font. Assign it the result of the calculation and embed that in your text.

Q3. That's because CHOOSE is the poor man's solution to not having indexed variables, which is directly supported in Mathcad:

i:0;10
x[i:blah_i

TTFN
 
IRstuff, what is that? i dond't understand?, can you explain a little bit more?
 
Try this using the MatCad functions concat and num2str

1- Start with the variable :
Bolt:=0.25in

2- Define the following strings:
a:="Use Bolt = " include space within the quote


- Convert the number Bolt to strin:
b:=num2str(Bolt/1in)
Notice (Bolt/in)= number without unit.

c:= "in diameter"

3- Link together the 3 strins:

X:=concat(a,b,c)

Result:

X="Use Bolt=0.25in diameter"

NOTE: If portion of this need to be hidden for presentation purposes go to [insert] menu then [Area] and move the variable and text within the mark. Finally, double click to hide the desire area.






 
To cuky2000:
Ok, THAT'S WHAT I WAS TRYING TO SAY!!, is exactly what it is!!, THANK YOU VERY MUCH!!!, i just try it and perfect!!

To IRstuff:
This part:

i:0;10
x[i:blah_i

I don't understand that.

For now, thank you everybody to take tha time to do this, everything has been very helpfull.
 
Those are the keystrokes in Mathcad for defining an indexed variable.

TTFN
 
To

Hi, ok i try to put this:

i:0;10
x[i:blah_i

As it is on the sheet and doesn't work, because every time i try to put ":" puts me ":=", can you please do it on a sheet and the put a picture here, if is not to much, thanks!
 
Typing ':' always gets ':='. As IRstuff said, those are the keystrokes, they are not necessarily what will show on the screen.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor