function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
SteveO1993SteveO1993 

VLookup function in salesforce.com?

Hi Everyone, I have been playing around most of today trying to find if there is a similar function in Salesforce to the "VLookup" function in Microsoft Excel.
 
The business objective I am trying to achieve is replace a text Country field with a 2 letter Country ISO code.  I have a seperate table of about 2,500 variations of countries that all map to an Country ISO value.
 
I tried using a CASE formula field, however the number of characters for such a function exceeds the maximum number of characters in this formula.  I was wondering if there is an elegant way to do this within Salesforce automatically, or could this only be manually updated through the API/upload.
 
Thanks a million,
Steve
Ron HessRon Hess
no vlookup ,

if you are looking for a simple macro lang to write this type of script
take a look at this package on the appexchange

Scripting Toolkit
SteveO1993SteveO1993
Thanks for the quick reply Ron!  I will look into this.