Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have nested if condition something like below (too nested).
IF (A like 'AZK*' , 'Azzar',
IF (A like 'VDN*' , 'Vodapone',
IF (A like 'WB*' , 'WorldBlue',
IF (A like 'wow*' , 'WOW! Security',
IF (A like 'ZA*' , 'ZoneAlarm',
IF (A like 'ys*' , 'sdgrsw',
'Unknown')))))
Can i use Match or any other function to avoid this nested IF??? for better performance?
Regards,
Sridhar
Pick(WildMatch(A ,'AZK*' , 'VDN*','WB*','wow*','ZA*', 'ys*')+1, 'Unknown', 'Azzar', 'Vodapone','WorldBlue','WOW! Security', 'ZoneAlarm','sdgrsw')
Try this:
Pick(WildMatch(A, 'AZK*', 'VDN*', 'WB*', 'wow*', 'ZA*', 'ys*', A), 'Azzar', 'Vodapone', 'WorldBlue', 'WOW! Security', 'ZoneAlarm', 'sdgrsw', 'Unknown')
Pick(WildMatch(A ,'AZK*' , 'VDN*','WB*','wow*','ZA*', 'ys*')+1, 'Unknown', 'Azzar', 'Vodapone','WorldBlue','WOW! Security', 'ZoneAlarm','sdgrsw')
May i know why we have used +1 here?
If there would be no match, wildmatch() would return 0, otherwise it's match index . By adding 1 to 0, pick() is told to pick the 1st text, i.e- 'Unknown'. For rest of the matched values, position is deferred by 1. Hope this helps.
Hi Sunny,
Unknown used here as for if not else, not to replace as 'A'. Can you clear the confusion?
In the new field that will be created you want it to be called 'Unknown', if it doesn't match any other names that we listed within WildMatch()?
OK Let me try yours and from tresesco. And take the one which is working. Thank you.