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!

How to Rewrite/Use Excel Nested IF Function in Mathcad 14 1

Status
Not open for further replies.

BrianCL

Mechanical
Aug 24, 2010
1
I am trying to derive a nominal value from a Mathcad result using nested IF functions. I can do this in Excel but am not clear on how, or if, this is possible in Mathcad. Has anyone tackled this issue and can offer some much appreciated assistance?

Here is original formula:
tbh:= (P + PAs) * OD / (2 * Sbh * Eh) + (1.8 * (P + PAs))

where, P=150 psi; PAs=0 psi; OD=96 in; Sbh=20000; Eh=1

Here is Mathcad result:
tbh = 0.357586 * in

Here is Excel function formula trying to replicate in Mathcad:
IF((tbh+0.0625)<=0.25,0,0.25,IF(tbh+0.0625>0.25,((ROUNDUP(tbh*16,0))+1)/16,"Error"))

Here is desired result: tbh_nom = 7/16 * in (fractional with units is desired output)

Thanks in advance for your help...
 
Replies continue below

Recommended for you

Seems to me that the equation would nearly the same for Mathcad, except that you have 3 items in your 1st IF, where only 2 are allowed.

The only differences are:
> Need to add units to each 0.625 and 0.25
> use Ceil instead of Roundup
> divide expression within Ceil by inches
> multiply entire Ceil calculation by inches
> Format Result to display fractions

see attached:


TTFN

FAQ731-376
 
Note that IRstuff couldn't reproduce your equation for tbh because the units are screwed up.
 
Oh, my bad, I don't even pay attention to that equation. But, yes, the units don't make sense.

Next time, just post the worksheet. Transcription from text format is for the birds...

TTFN

FAQ731-376
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor