logo
search
Function Problems

How to Match DSCODEs to Company Names in Excel

Kushani NimanthikaKushani Nimanthika Sep 27, 2026 868 views

Question details

The user wants to find and retrieve company names corresponding to specific DSCODEs within a spreadsheet.

How to Match DSCODEs to Company Names in Excel
Product
Excel
Device & OS
not provided
Scenario
Matching data from a list of codes to their respective entity names using lookup functions.
Observed behavior
The user has a list of DSCODEs but needs to automatically populate the corresponding company names by referencing a master database or table.
Before you start

Ensure you have a reliable reference table within your workbook that accurately maps every DSCODE to its corresponding company name, and verify that there are no trailing spaces in your code cells.

Solution 1Recommended

Use VLOOKUP to Match DSCODEs to Company Names

VLOOKUP is the standard method for searching for a code in a reference table and returning the adjacent company name.

The VLOOKUP function searches for a specific value in the first column of a table array and returns a value in the same row from another column. For this to work, your reference table must have the DSCODEs situated in the leftmost column.

1
Prepare the reference table

Ensure your reference database has the DSCODE in the first column and the Company Name in the second column.

2
Select the target cell

Click the empty cell next to the DSCODE in your main dataset where you want the matched company name to appear.

3
Enter the VLOOKUP formula

Type =VLOOKUP(A2, Sheet2!$A$2:$B$100, 2, FALSE). In this formula, A2 is the DSCODE you are looking up, Sheet2!$A$2:$B$100 is your reference table, 2 is the column index containing the company names, and FALSE ensures an exact match.

4
Apply to the entire list

Press Enter, then click and drag the fill handle at the bottom-right corner of the cell to apply the formula down through all rows.

Use VLOOKUP to Match DSCODEs to Company Names
Absolute References: Remember to lock your reference table range with dollar signs (e.g., $A$2:$B$100) so the table area doesn't shift downwards when copying the formula to other rows.
Efficient Data Matching with WPS Office

Easily Match Data and Use Lookup Functions with WPS Office

WPS Spreadsheet provides robust support for all advanced lookup functions, including VLOOKUP, XLOOKUP, and INDEX/MATCH. You can easily map DSCODEs to company names with its intuitive interface, reliable formula calculation, and excellent performance.

  1. 1. Open your workbook in WPS Spreadsheet: Launch WPS Office and open the file containing your DSCODEs and reference table.
  2. 2. Access the Formula tab: Navigate to the Formulas tab on the top ribbon and select 'Insert Function'.
  3. 3. Select the VLOOKUP function: Search for VLOOKUP or XLOOKUP in the dialog box and click OK.
  4. 4. Input formula arguments: Use the visual formula builder to select your lookup value, reference array, and return column, then click OK to instantly retrieve the company name.
Fully compatible with Microsoft Excel (.xlsx) file formats and formulas.Supports advanced functions like VLOOKUP and XLOOKUP for seamless data matching.Lightweight software with fast processing speeds for large reference tables.Free and easy to use with a familiar spreadsheet interface.
microsoft office alternative - wps office

Frequently Asked Questions

Why is my VLOOKUP returning an #N/A error when matching DSCODEs?

An #N/A error typically means the exact DSCODE was not found in your reference table. Check for trailing spaces, formatting differences (such as numbers stored as text), or verify if the code is actually missing from the master list.

Can I match company names if my DSCODEs are in the second column of the reference table?

Standard VLOOKUP only searches the first (leftmost) column of a selected range. If your codes are situated to the right of the company names, you must use XLOOKUP or an INDEX and MATCH formula combination instead.

How do I remove the formulas and keep only the company names as text?

Select the cells containing your VLOOKUP formulas, copy them (Ctrl+C), right-click the exact same selection, and choose 'Paste as Values' (the clipboard icon with '123'). This permanently replaces the formulas with the retrieved text.