Friday, March 23, 2018

Salesforce: Convert ID from 15 to 18 characters with Excel formula

CASESAFEID() will return 18 characters ID from original 15 characters ID, the main difference is: 15 characters ID is case sensitive, while 18 characters ID is case insensitive. The issue will arise when using 15 characters ID when your teams working in Excel for data analysis, VLOOKUP() of Excel will not work properly, as it is case insensitive, so the best is to use 18 characters ID which is case insensitive.

But, if you are not the system admin or do not have permission to create a custom field to use CASESAFEID() for case-insensitive 18 characters ID, you can copy and paste the 15 characters ID using this online tool from admin booster to produce the 18 characters ID.

The other option and this is very useful when you have a lot of rows in Excel that needs to convert the ID from 15 to 18 characters is to use Excel formula. The formula below is copied from Salesforce developer forum, just change A2 with the excel cell of 15 characters ID.


ReferenceFormula Field: calculating the 18-digit ID from the 15-digit ID