请教一下 vlookup(a1,sheet1!a:b,2,0)这个函数公式末尾的2和0分别表示什么涵义?

请教一下 vlookup(a1,sheet1!a:b,2,0) 这个函数公式末尾的2和0分别表示什么涵义?

VLOOKUP(lookup_value,table_array,col_index_num,range_lookup) is a function in Excel that allows you to search for specific values in a table and return a corresponding value from another column in that table. The function takes the following arguments:
- Lookup_value: This is the value you want to search for in the first column of the table_array.
- Table_array: This parameter specifies the range of data that you want to search through. It can be an explicit range or a named range, a constant array, or even a computed memory array.
- Col_index_num: This argument specifies which column of the table_array you want to return a value from. If col_index_num is less than or equal to zero, VLOOKUP returns an error value #VALUE!. Otherwise, it returns an error value #REF! if col_index_num exceeds the number of columns in the table_array.
- Range_lookup: This argument is a logical value that determines whether VLOOKUP should return an approximate match or a precise match. If set to TRUE or omitted, VLOOKUP will return an approximate match value, which means if no exact match is found, it will return the largest value less than or equal to lookup_value. However, if range_lookup is FALSE (or zero), VLOOKUP will return an exact match value if available. In this case, sorting of the table_array is not required.
In summary, VLOOKUP can be used to search for values within a table and retrieve specific columns from that table based on certain criteria. It allows for precision or approximation matching based on user preference and provides flexibility in data retrieval through its various arguments.这个公式的意思是:
vlookup是纵向查找函数;A1表示需要查找的值,此处表示查找A1单元格内的值;
“sheet1!A:B”是指查找的区域,此处表示查找的区域为表sheet1的A列与B列;
“2”是指返回数据在查找区域的第几列数,此处表示返回数据在sheet1表A列与B列的第二列即B列;
“FALSE”是指查找的过程为精确匹配,此处表示如果有匹配数据,返回匹配数据,如果没有匹配数据,则返回错误值 #N/A。
整个公式的意思就是:
在表sheet1的A列与B列内精确匹配查找与单元格A1匹配的第2列即B列数据,并将查找到的数据返回到使用函数的单元格内。
操作实例:

例如表格中的A1:B10为查找区域,D2,D3,D4为需要查找的值,每个人对应的订单量为需要查找到的数值,匹配过程为精确匹配,那么相应的结果则会直接出现在使用纵向查找函数的单元格内。
拓展资料:
一、vlookup函数语法规则如下:
VLOOKUP(lookup_value,table_array,col_index_num,range_lookup)
二、VLOOKUP函数使用注意事项
1.括号里有四个参数,是必需的。
2.Lookup_value是一个很重要的参数,它可以是数值、文字字符串、或参照地址。我们常常用的是参照地址。用这个参数时,有三点要特别提醒:
A)参照地址的单元格格式类别与去搜寻的单元格格式的类别要一致。
而且格式类别在未输入数据时就要先确定好,如果数据都输入进去了,发现格式不符,已为时已晚,若还想去抓,则需重新输入。
B)在使用参照地址时,有时需要将lookup_value的值固定在一个格子内,而又要使用下拉方式(或复制)将函数添加到新的单元格中去,可以用到“$”这个符号了进行固定单元格。
C) 用“& 连接若干个单元格的内容作为查找的参数。在查找的数据有类似的情况下可以做到事半功倍。
3.Table_array是搜寻的范围,col_index_num是范围内的栏数。
选取Table_array时一定注意选择区域的首列必须与lookup_value所选取的列的格式和字段一致。比如lookup_value选取了“姓名”中的“张三”,那么Table_array选取时第一列必须为“姓名”列,且格式与lookup_value一致,否则便会出现#N/A的问题。
4.在使用该函数时,lookup_value的值必须在table_array中处于第一列。
5.使用该函数时,返回的是目标区域第一个符合查找值的数值。也就是说在目标区域存在多个目标值时,则应特别注意。
参考资料:百度百科-VLOOKUP函数这是引用函数,其基本格式为:=vlookup(目标单元格,寻找区域,找到目标后返回第几列,0)。
所以你所问的,其中的2,表示在sheet1!a:b这个区域内查找a9,找到以后返回第二列也就是b列里面的数据;而你问的0是个固定格式,就是说没找到就返回错误的意思(相当于fasle),你不用理会。这个公式本身没有问题,应该是其他地方出问题了,比如A1单元格不是独立赋值的,而是引用了其他地方的,而这个引用源与你输入公式的这个单元格有关联。 报错误之后,表格会显示一条绿色的箭头,就是有逻辑错误的单元格,你检查一下箭头指向的单元格的引用关系吧。 或者把数据表整个发给我,我给你解决。

发布者:admin,转转请注明出处:http://www.yc00.com/num/1724715319a3084468.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信