Skip to main content
14-Alexandrite
Aug 24, 2025 6:32 PM UTC
Solved

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

23-Emerald V
Aug 24, 2025 7:19 PM UTC

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

3 replies

23-Emerald V
Aug 24, 2025 7:19 PM UTC

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

Translate
SFares14-AlexandriteAuthor
14-Alexandrite
Aug 24, 2025 8:06 PM UTC

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

 

 

 

 

Translate
terryhendicott
21-Topaz II
Aug 24, 2025 11:45 PM UTC

Hi Sam,

Here is another way without the programming:

Capture2.JPG

Cheers

Terry

Translate