VLOOKUP / Marketing Specialist

Map Lead Source to CRM Code

I have a list of lead sources like 'Facebook' and need to find their corresponding numeric code from a reference table.

formula.xlsx
=VLOOKUP(B2,D:E,2,FALSE)

How it works: The VLOOKUP function searches for the 'Lead Source' (B2) in the first column of the specified table array (D:E). Once it finds an exact match, it returns the value from the second column (2) of that same row, which is the corresponding CRM Code. Using FALSE ensures an exact match, preventing incorrect code assignments for similar but not identical lead source names.

Data Setup

Lead ID Lead Source CRM Code Source CRM Code
101 Facebook Facebook 1001
102 Google Ads Google Ads 1002
103 LinkedIn LinkedIn 1003
104 Email Campaign Email Campaign 1004
105 Facebook Organic Search 1005

Step-by-Step Guide

1

Identify the lookup value: This is the 'Lead Source' in your main data (e.g., cell B2).

2

Define the table array: This is your reference table containing both the lead sources and their corresponding CRM codes (e.g., range D2:E6 or D:E for entire columns).

3

Specify the column index number: This is the column number in your table array that contains the value you want to return (e.g., 2, for the 'CRM Code' column in the D:E range).

4

Choose the range lookup type: For an exact match, use FALSE or 0.

5

Combine these into the VLOOKUP formula: =VLOOKUP(B2,D:E,2,FALSE).

6

Enter the formula in the first cell of your 'CRM Code' column (e.g., C2) and drag it down to apply to all lead sources.

Explore More