
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If Else expression
Hello
I have an expression which goes like this
=
If(A like 'B', 'B',
If(A like 'C*', 'C',
If(A like 'D*', 'D',
null())))
But I want to change it to also give a title to all other possible entries
So something like this
=
If(A like 'B', 'B',
If(A like 'C*', 'C',
If(A like 'D*', 'D',
Else ('E',
null()))))
So if A isnt like B,C or D it is presented as E
If there is a way to do this it would be appreciated

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
May be this
=If(A like 'B', 'B',
If(A like 'C*', 'C',
If(A like 'D*', 'D', 'E')))
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Try this?
Pick(Match(A, 'B', 'C*', 'D*'), 'B','C','D', 'E')
OR
If(Match(A, 'B'), 'B',
If(Match(A, 'C*'), 'C',
If(Match(A, 'D*'), 'D', 'E')))
Note - I am not sure i understand about Null() part

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You would need this for Pick Match....
Pick(WildMatch(A, 'B', 'C*', 'D*') + 1, 'E', 'B','C','D')
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
WildMatch is good one, But what does the use of +1 here?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Basically
when A = B, WildMatch will give 1 + 1 = 2
when A = C*, WildMatch will give 2 + 1 = 3
when A = D*, WildMatch will give 3 + 1 = 4
when A = E, WildMatch will give 0 + 1 = 1
The way you wrote the expression, for E to show up, its value needs to be 4, but E can never equal 4, so its better to put it as the first clause....
Does that make sense?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, LOT sense now. May be i miss this concept. I need to endorse this part. Thanks Bhai
