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

Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X

RE:change text in a formula

gbradley
1-Newbie

RE:change text in a formula

can you change text based on a formula without using the if statment.

for example.

sf = if(design = LRFD, "resistance factor", "shear factor"

Can the above be done by another method?maybe programming

Thanks

ACCEPTED SOLUTION

Accepted Solutions
MoeSzyslak
4-Participant
(To:Werner_E)

Sure you can -- you can have any unicode character in a MC text string. Unfortunately for the OP, there is no unicode for 'subscript b'.

Capture.PNG

View solution in original post

8 REPLIES 8
MikeArmstrong
5-Regular Member
(To:gbradley)

You could use one of the lookup features or the match feature. It would depend on what data you have. Could you provide an example?

I'll try mike but its a bit hard hard to explain with what I'm trying to achieve.

I'm trying to change the text in an IF statement but there is a variable in the if statment which needs to be chnaged

for example this is what I've got.

sf1:=if(design="LRFD","Resistance factor for shear phi0.9", "safety factor for shear omega 1.67")

however phi0.9 and omega 1.67 are variables, this is the bit I'm struggling with, these bits of text need to change based on a selection from the user.

MikeArmstrong
5-Regular Member
(To:gbradley)

You will need to break the string down and extract the unique part.

The attached sheet shows a collection of string functions which may be of use. I did not create them, I blieve the credit has to go to Stuart Bruff.

RichardJ
19-Tanzanite
(To:gbradley)

Does this help?

variable+in+string.png

almost. Where phi is written in text, is it possible to write the symbol for phi followed subscript. ϕ.b (b subscripted)

Werner_E
25-Diamond I
(To:gbradley)

Gareth Bradley wrote:

almost. Where phi is written in text, is it possible to write the symbol for phi followed subscript. ϕ.b (b subscripted)

You can't have subscripts in a mathcad text string.

MoeSzyslak
4-Participant
(To:Werner_E)

Sure you can -- you can have any unicode character in a MC text string. Unfortunately for the OP, there is no unicode for 'subscript b'.

Capture.PNG

MikeArmstrong
5-Regular Member
(To:MoeSzyslak)

Nice spot Moe

Announcements

Top Tags