Skip to main content
14-Alexandrite
August 24, 2025
Solved

4 Nested if Statements

  • August 24, 2025
  • 1 reply
  • 841 views

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

Best answer by StuartBruff

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

1 reply

23-Emerald V
August 24, 2025

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

SFares14-AlexandriteAuthor
14-Alexandrite
August 24, 2025

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

 

 

 

 

21-Topaz II
August 24, 2025

Hi Sam,

Here is another way without the programming:

Capture2.JPG

Cheers

Terry