Filter string by a condition

Hello everyone, please I have a list of strings and I want to replace every single item with a personalized value:
T = 0
C = 0
R-C = 90
T-T = 10
T-R = -90
is that possible to use an IF statement or script with a code block to make this thinks happen


string to values.xlsx (8.2 KB)
Strings To Personalized Values.dyn (17.9 KB)

Absolutely. You may want to look into dictionaries, they’re built for this exact kind of thing, but a nested IF statement will work just as well. I suggest starting with one condition and just adding one at a time.

2 Likes

Okay @Nick_Boyts I wish if that can be workt, thank you so much I will try using dictionaries to see how I can make it work :innocent::innocent:

@ihouzi following on @Nick_Boyts suggestion, I hope this is what you are looking for, I think there are many ways to achieve this