Home  >  Article  >  Software Tutorial  >  How to select the same data in different columns in EXCEL

How to select the same data in different columns in EXCEL

PHPz
PHPzforward
2024-01-11 17:39:331600browse

How to select the same data in different columns in EXCEL

How to select the same data in different columns in EXCEL

Enter the formula in E1: =INDEX($A$1:$A$100,SMALL(ISNUMBER(MATCH($A$1:$A$100,$C$1:$C$200,0))*ROW($A$1 :$A$100),ROW(A1) ROW(INDIRECT("A"&SUM(ISNA(MATCH($A$1:$A$100,$C$1:$C$200,0))*1))))

Press Ctrl Shift Enter to confirm the input.

Enter the formula in F1: =IF(ISERR(E1),""",VLOOKUP(E1,$A$1:$B$100,2,0))

Enter the formula in G1: =IF(ISERR(E1),""",VLOOKUP(E1,$C$1:$D$200,2,0))

illustrate:

1. $A$1:$A$100 is the assumed data area of ​​columns A and B, and $C$1:$C$200 is the data area of ​​columns C and D. Be careful to use absolute references.

2. When copying the formula downwards, an error occurred (#NUM!) when copying to column E. This error could have been blocked by using the IF function like the F and G formulas, but in that case, the formula would be too long.

---------------------------------

Welcome to the Excel Home forum to learn and communicate

How to use completion condition selection in EXCEL

Take the following data table as an example. Regarding the setting of conditional areas, there are the following aspects that need to be paid attention to:

1. The condition area contains at least two lines. By default, the first line serves as the field title and the second line serves as the condition parameter. In some cases (discussed later), field titles can be left blank; condition parameters can also be left blank to indicate arbitrary conditions.

2. In order to avoid errors, the condition area should be placed separately from the data area as much as possible. The condition area can even be placed in different worksheets.

3. The same column contains multiple conditional parameters, which represents a logical "OR" of parallelism. If any one of the conditions is met, it can be included in the function statistics.

For example: The condition area indicates that the "salesperson" field can be "Chen Sheng" or "Lin Musen" or "Qiu Ying".

4. The same line contains multiple conditional parameters, indicating the logical "AND" of cross-overlay. At the same time, records that meet these conditions can be included in the statistical category by the function.

For example: the condition area represents records in which the "salesperson" field is "Chen Sheng" and the "supermarket" field value is "RT-Mart".

5. If the condition area contains multiple rows and columns, refer to the above two rules for logical combination.

For example: The condition area indicates that the record needs to satisfy the "Chen Sheng" salesperson of "RT-Mart" supermarket or any salesperson of "Wal-Mart" supermarket.

6, conditional parameters are not case-sensitive. If you need to be case sensitive, you can build a condition using a function formula that supports case sensitivity.

7, for text fields, you can use wildcard characters, including "*", "?" and "~".

For example: the condition area represents all records whose salesperson field starts with the word "Lin".

8. In the condition parameters, in addition to directly filling in text and values, you can also use comparison operators to directly connect text or values ​​to express comparison conditions.

For example: the lower condition area indicates that the salesperson is "not equal to" Chen Sheng and the quantity is "greater than" 4000, and the function statistics result is 6.

9, in addition to filling in the conditions directly, you can also use the equal sign to guide the conditions, where the condition part needs to be surrounded by half-width double quotes.

For example: the condition area shows the conditions that can be entered.

10, conditional parameters can also use formulas (the above one cannot be counted as a real formula). When using a formula as a condition, the field title must be left blank or use a title that does not exist in other data tables. The conditional formula must be a formula for logical judgment.

11. The field title cannot be directly referenced in the formula of the condition parameter. When the entire field needs to be referenced, the cell where the first record is located can be used as a reference, and relative reference must be used.

The above is the detailed content of How to select the same data in different columns in EXCEL. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:docexcel.net. If there is any infringement, please contact admin@php.cn delete