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

Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X

Translate the entire conversation x

4 Nested if Statements

SFares
14-Alexandrite

4 Nested if Statements

Hello All,

 

I have attached P9 mathcad sheet. I am struggling to do four "if" statements. I have  four different exposures A,B,C, and D. I managed to do up to exposure B. I just did exposure "B" and I don't remember how i did it.I am not able to add another "else" statement for exposure C, D. 

 

Thank you!

Sam

ACCEPTED SOLUTION

Accepted Solutions
StuartBruff
23-Emerald IV
(To:SFares)

The programming construct elseif might be what you're looking for.  Is the following what you intended?

 

2025 08 24 A.png

 

I haven't got Mathcad Prime 9, I'm afraid.  Only MP10 and MP11, neither of which save backward compatible worksheets.

 

Stuart

View solution in original post

3 REPLIES 3
StuartBruff
23-Emerald IV
(To:SFares)

The programming construct elseif might be what you're looking for.  Is the following what you intended?

 

2025 08 24 A.png

 

I haven't got Mathcad Prime 9, I'm afraid.  Only MP10 and MP11, neither of which save backward compatible worksheets.

 

Stuart

SFares
14-Alexandrite
(To:StuartBruff)

I appreciate it  so much, Stuart!

The issue was  i did not have the double line "Program" as you are showing before i started my if statement. I corrected it and got the result.

 

Regards,

Sam

 

 

 

 

Hi Sam,

Here is another way without the programming:

Capture2.JPG

Cheers

Terry

Announcements

Top Tags