I have a pretty long nest of statements and it's returning one particular value that probably shouldn't be found at all.
It looks like this but goes on for a long way:
IF "AA" THEN "Afar" ELSEIF "AB" THEN "Abkhazian" ELSEIF "AF" THEN "Afrikaans" ELSEIF "AM" THEN "Amharic" ELSEIF "AR" THEN "Arabic" ELSEIF "AS" THEN "Assamese" ELSEIF "AY" THEN "Aymara" ELSEIF "AZ" THEN "Azerbaijani" ELSEIF "BA" THEN "Bashkir" ELSEIF "BE" THEN "Byelorussian" ELSEIF "BG" THEN "Bulgarian" ELSEIF "BH" THEN "Bihari" ELSEIF "BI" THEN "Bislama" ELSEIF "BN" THEN "Bengali" ELSEIF "BO" THEN "Tibetan" ELSEIF "BR" THEN "Breton" ELSEIF "CA" THEN "Catalan" ELSEIF "CO" THEN "Corsican" [.......] ELSE "" ENDIF
Solved! Go to Solution.
I would suggest creating a Text Input table to feed into your data with a Find & Replace tool... so create a list like this:
Abbr | Name |
AA | Afar |
AB | Abkhazian |
AF | Afrikaans |
etc...
Then Use the Find & Replace tool to connect this list to your original data, finding the code in the Abbr column and replacing it with the word in the Name column. That should help with eliminating the very long nested IF statement, as well as make it much easier to add to/modify the list of abbreviations/names after the fact!
NJ
...So, I've never used that tool. I do have the Code and the Language column in an Excel file. I'll start researching that - if you have any additional info on how to go about setting that up - that would be great. Thanks for all your help. Greatly appreciated.
I think we got it. Thanks again.
.