Home  >  Article  >  Topics  >  How to search accurately using lookup function

How to search accurately using lookup function

藏色散人
藏色散人Original
2020-03-09 09:59:4415793browse

How to search accurately using lookup function

How to use the lookup function to query accurately?

Lookup function precise search method

As shown in the table below, we want to query student scores based on name,

In this example we want to Check "Cai Jian"'s "Chinese" score.

Recommended learning: Excel basic tutorial

How to search accurately using lookup function

Enter "=lookup(" in the cell as shown, a prompt will appear:

LOOKUP(lookup_value,lookup_vector,result_vector) [Vector form]

How to search accurately using lookup function

The first parameter "lookup_value" asks us what value we want to query and tells the computer us To query the value "1",

How to search accurately using lookup function

The second parameter "lookup_vector" asks us which area we want to query,

Enter: 0/( A2:A8=F2),

(A2:A8=F2) is a logical array formula,

press F9 to view the operation result: {FALSE;FALSE;FALSE;TRUE;FALSE; TRUE;FALSE},

What this formula calculates is not a value, but a set of logical values.

(A2:A8=F2) is a set of logical values, 0/( A2:A8=F2) is 0 divided by a set of logical values.

In the four arithmetic operations, 1 is usually used to replace the logical true value true, and 0 is used to replace the logical false value false.

0 /{FALSE;FALSE;FALSE;TRUE;FALSE;TRUE;FALSE}, which is equivalent to,

0/{0;0;0;1;0;1;0}, 0/0 The result is the error value #DIV/0!, the result of 0/1 is 0,

gets the array: {#DIV/0!;#DIV/0!;#DIV/0!;0;#DIV /0!;0;#DIV/0!}

How to search accurately using lookup function

at{#DIV/0!;#DIV/0!;#DIV/0!;0;# Query 1 in DIV/0!;0;#DIV/0!},

cannot match the same value, then match the maximum value less than 1,

then matches 0, function Returns 58 in another set of numbers B2:B8 corresponding to 0.

This enables precise querying using the lookup function.

How to search accurately using lookup function

The above is the detailed content of How to search accurately using lookup function. 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