Hello,
Please help me with the formula.
Condition description
New column to be created with condition that Seccode1 should be equal to Sedol and if sedol is missing then Isin and also if Isin and Sedol both missing then Cusip.
Input | Input | Input | Output |
Isin | Sedol | Cusip | Secode1 |
US3140QKGB85 | 3140QKGB8 | US3140QKGB85 | |
SE0005676608 | BPXR9R2 | W77537SD6 | BPXR9R2 |
BMG9156K1018 | BF5BLM1 | G9156K101 | BF5BLM1 |
BMG9156K1018 | BF5BLM1 | G9156K101 | BF5BLM1 |
AU0000157067 | BNNVRL0 | Q9269W108 | BNNVRL0 |
901384107 | 901384107 | ||
KYG8875G1029 | BY9D3L9 | G8875G102 | BY9D3L9 |
U81522AG6 | U81522AG6 |
Solved! Go to Solution.
An if elseif should work
if !IsEmpty([Sedol]) then [Sedol] elseif !IsEmpty([Isin])then [Isin] else [Cusip] endif
Hi @Devika,
The formula @SPetrie provided is perfect!
To help you understand how IF-ELSEIF-ELSE works, I've provided another example, where all the conditions are positive (e.g. no "!"/not).
Note, the ordering is very important.
The statements are evaluated from top to bottom. So for example, if we wrote
"IF ISEMPTY([Sedol]) THEN [Isin] " first, then it will give a different result.