search
HomeSoftware TutorialOffice SoftwareHow to match data in two tables in excel

There are two methods to correspond to data in different tables in Excel: use the VLOOKUP function to search within the search range based on the search value and return the corresponding data. Use the INDEX and MATCH function combination to return values ​​within a specified range by matching lookup values.

How to match data in two tables in excel

How to correspond to data in different tables in Excel

How to correspond to data in different tables in Excel Two common methods:

Method 1: Using the VLOOKUP function

The VLOOKUP function is used to find a specific value in a table and return the data corresponding to that value. The syntax is:

<code>=VLOOKUP(查找值, 查找范围, 返回列, [近似匹配])</code>

Among them:

  • Find value: The value that needs to be found in the search range.
  • Lookup range: The table containing the value to be looked up.
  • Return column: Specify the column where the data corresponding to the lookup value is to be returned.
  • Approximate matching (optional): Specify whether to use approximate matching, the default value is FALSE.

Example:

Suppose there are two tables, "Employee Information" and "Sales Records", which need to correspond to the employee names in each sales record:

Employee information Sales records
Name Employee Number Sales Date Sales Record
John Doe 1 2023-01-01 100
Jane Smith 2 2023-01-02 150
Peter Davis 3 2023-01-03 200

In the "Sales Record" table, you can use the following VLOOKUP function to Corresponding employee name:

<code>=VLOOKUP(A2, '员工信息'!A:B, 2, FALSE)</code>

This function will find the employee number corresponding to the sales date in the "Employee Information" table based on the employee number, and return the employee's name.

Method 2: Use the INDEX MATCH function

The combination of INDEX and MATCH functions can also be used to correspond to data in different tables. The INDEX function returns a value within a specified range, while the MATCH function finds the position of a specified value within a specified range. The syntax is:

<code>=INDEX(返回范围, MATCH(查找值, 查找范围, [近似匹配]))</code>

Among them:

  • Return range: Specify the table to return data.
  • Search value: The value that needs to be found within the search range.
  • Lookup range: The table containing the value to be looked up.
  • Approximate matching (optional): Specify whether to use approximate matching, the default value is FALSE.

Example:

For the above example, you can use the following combination of INDEX and MATCH functions to correspond to employee names:

<code>=INDEX('员工信息'!A:A, MATCH(A2, '员工信息'!B:B, 0))</code>

This function will Find the employee number in column A of the "Employee Information" table that matches the employee number in the "Sales Records" table, and return the employee's name.

The above is the detailed content of How to match data in two tables in excel. For more information, please follow other related articles on the PHP Chinese website!

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Excel CONCATENATE function to combine strings, cells, columnsExcel CONCATENATE function to combine strings, cells, columnsApr 30, 2025 am 10:23 AM

This article explores various methods for combining text strings, numbers, and dates in Excel using the CONCATENATE function and the "&" operator. We'll cover formulas for joining individual cells, columns, and ranges, offering solutio

Merge and combine cells in Excel without losing dataMerge and combine cells in Excel without losing dataApr 30, 2025 am 09:43 AM

This tutorial explores various methods for efficiently merging cells in Excel, focusing on techniques to retain data when combining cells in Excel 365, 2021, 2019, 2016, 2013, 2010, and earlier versions. Often, Excel users need to consolidate two or

Excel: Compare two columns for matches and differencesExcel: Compare two columns for matches and differencesApr 30, 2025 am 09:22 AM

This tutorial explores various methods for comparing two or more columns in Excel to identify matches and differences. We'll cover row-by-row comparisons, comparing multiple columns for row matches, finding matches and differences across lists, high

Rounding in Excel: ROUND, ROUNDUP, ROUNDDOWN, FLOOR, CEILING functionsRounding in Excel: ROUND, ROUNDUP, ROUNDDOWN, FLOOR, CEILING functionsApr 30, 2025 am 09:18 AM

This tutorial explores Excel's rounding functions: ROUND, ROUNDUP, ROUNDDOWN, FLOOR, CEILING, MROUND, and others. It demonstrates how to round decimal numbers to integers or a specific number of decimal places, extract fractional parts, round to the

Consolidate in Excel: Merge multiple sheets into oneConsolidate in Excel: Merge multiple sheets into oneApr 29, 2025 am 10:04 AM

This tutorial explores various methods for combining Excel sheets, catering to different needs: consolidating data, merging sheets via data copying, or merging spreadsheets based on key columns. Many Excel users face the challenge of merging multipl

Calculate moving average in Excel: formulas and chartsCalculate moving average in Excel: formulas and chartsApr 29, 2025 am 09:47 AM

This tutorial shows you how to quickly calculate simple moving averages in Excel, using functions to determine moving averages over the last N days, weeks, months, or years, and how to add a moving average trendline to your charts. Previous articles

How to calculate average in Excel: formula examplesHow to calculate average in Excel: formula examplesApr 29, 2025 am 09:38 AM

This tutorial demonstrates various methods for calculating averages in Excel, including formula-based and formula-free approaches, with options for rounding results. Microsoft Excel offers several functions for averaging numerical data, and this gui

How to calculate weighted average in Excel (SUM and SUMPRODUCT formulas)How to calculate weighted average in Excel (SUM and SUMPRODUCT formulas)Apr 29, 2025 am 09:32 AM

This tutorial shows you two simple ways to calculate weighted averages in Excel: using the SUM or SUMPRODUCT function. Previous articles covered basic Excel averaging functions. But what if some values are more important than others, impacting the f

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

DVWA

DVWA

Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

Atom editor mac version download

Atom editor mac version download

The most popular open source editor

VSCode Windows 64-bit Download

VSCode Windows 64-bit Download

A free and powerful IDE editor launched by Microsoft

Dreamweaver Mac version

Dreamweaver Mac version

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)