Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

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

Mathcad version of iserror in Excel

Status
Not open for further replies.

mathcadboy

Civil/Environmental
Joined
Sep 14, 2009
Messages
38
Location
PH
I wonder how do I do like an iserror function of excel in mathcad.

for example, I am going to match a number to an array that doesnt have a match to that number. Mathcad only gives out an error message saying that "no matching values found". how do I make mathcad do something else if no values are matching instead of just giving out that error message.

Thanks in advance!
 
I suppose you could use Match(z,A,"not"). The result would be an array with all the indeces where the value was not found. If you compare that to the bounds of the original array and the values are the same, then it was not found.
 
I think it could work. you could compare the number of rows of the original matrix to the one resulting in Match(z,A,"not"). Thanks!
 
That's fine if you only have a single row, otherwise you'll have to use something like:
err:=if(rows(M)*cols)M)-rows(index),"there","not there")
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top