Back to blog

Salesforce Tips: Dealing with 15 vs 18-character Record IDs

We all know that each record in Salesforce is automatically assigned to a unique identifier as a Record ID. This is very handy, since we do not need to worry about manually creating the primary key.

“I have enjoyed increasing my potential customers, and I hope to reach more of them.”


If you are new to Salesforce, you will soon discover that there are two types of Record ID: the 15-character CamelCase Record ID and the 18-character Non-CamelCase Record ID. In most cases, you will see the 18-character Record ID.  For instance, when you open the record in a browser or you download the record data using the Salesforce Data Loader, you are going to see the 18-character Record ID.  However, when you pull the Record ID using Salesforce Report, it shows the 15-character Record ID instead. This becomes a challenge when you try to use Excel to perform VLOOKUP operations between Salesforce Report and Salesforce Data Loader data.  

The good news is that there are ways to convert the 15-character Record ID to the 18-character type. The two most common approaches are 1) Using Excel formula or 2) Using Salesforce formula field.  Each approach has its advantages and disadvantages. 

Let’s discuss.

1. Using Excel Formula

Let’s assume that you download a Salesforce report to an Excel file, and it has the 15-character Record ID that you need to convert the 18-character Salesforce ID in cell A2. You can simply put the formula below in a new cell: 






















2. Using Salesforce Custom Field

You can also create a new custom formula field in the object where you want to capture the 18-character ID of the Salesforce record, using the CASESAFEID(Id) formula.

You can find more details in this Salesforce help article.   

3. Choosing between the two

When it comes time to decide which of the two options is best for you, it’s important to consider the following:

Thank you for reading. We hope this information was helpful. If you have any questions, please don't hesitate to contact us. Request a quote today and let us help you get the most out of your Salesforce investment.

More Notes

Dreamforce 2023: Modelit’s top takeaways

Join us as we uncover our key highlights from this year’s AI-inspired Dreamforce conference.

The Modelit Team
Read more

The True Value of Attending Dreamforce

Check out our latest article, where we explore the unique value of attending Salesforce’s biggest event of the year, Dreamforce.

The Modelit Team
Read more

Deciphering the role of a Salesforce PDO Partner

Allow us to introduce the role of the Salesforce PDO Partner: a catalyst of AppExchange innovation to amplify an ISV’s impact.

The Modelit Team
Read more