Use Data Loader to export Leads with or without assigned personal / public tags to a CSV file.
To export records: “Read” on the records
To export all records: “Read” on the records
Because Lead Tags are stored as a separate object (LeadTag) from the Lead record itself, exporting leads with their associated tags requires two separate Data Loader exports that are then joined using Excel's VLOOKUP function.
You can use the Apex Data Loader export wizard to export Leads with or without Tags from Salesforce. When you export, you can choose to include (Export All) or exclude (Export) soft-deleted records.
Note: To learn more about Tags, please review the Enable Tags documentation.
8. Click Finish, then click Yes to confirm.
9. A progress information window reports the status of the operation.
10. After the operation completes, a confirmation window summarizes your results. Click View Extraction to view the CSV file, or click OK to close.
After you finish exporting LeadTags, you need to use Data Loader to export All Leads by following Steps 4 to 8 once again for the Lead object and save the file with a different name.
We then require opening the LeadTags.csv and AllLeads.csv file. Use the Vlookup function in Microsoft Excel to insert the tag name and tag id into the AllLeads.csv file.
Note: Salesforce does not provide support for Microsoft Excel features or functionality and it's against its policy to perform data management or manipulation (de-duping, merging, cleansing) tasks including vlookups. The following details are provided to serve as general guidelines for customers to prepare their data and can't be performed by Support on their behalf.
Insert a new column in the “AllLeads.csv” file.
Apply vlookup formula in AllLeads.csv new column to find leads id in LeadTags.csv file item id column and pull out the tag name /tag id against it. See below:
=VLOOKUP("002Q8000004d10K", A2:B16, 2, FALSE)
1st - The first argument is the name of the item you're searching for
2nd - The second argument is the cell range that contains the data in another sheet.
Note: It's important to know that VLOOKUP will always search the first column in this range.
3rd - The third argument is the column index number to pull from the table and returned by the formula. The first column in the range is 1; the second column is 2, etc.
4th - The fourth argument tells VLOOKUP whether to look for approximate matches, and it can be either TRUE or FALSE.
Your file is complete now with All leads with & without tags. Use an excel filter to identify.
Repeat the above steps of Vlookup to insert the tag id column in the All Leads.csv file. When done, you can use a filter on tagname/ tagid fields to identify only those records of leads which are tagged and cut them and paste them in a separate file. In that way, you have two files of Lead records with and without tags.
000386894

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.