Excel操作之VLOOKUP
https://support.office.com/en-us/article/VLOOKUP-function-0bbc8083-26fe-4963-8ab8-93a18ad188a1
Use VLOOKUP, one of the lookup and reference functions, when you need to find things in a table or a range by row.
For example, look up a price of an automotive part by the part number.
In its simplest form, the VLOOKUP function says:
=VLOOKUP(Value you want to look up, range where you want to lookup the value, the column number in the range containing the return value, Exact Match or Approximate Match – indicated as 0/FALSE or 1/TRUE).
This video is part of a training course called VLOOKUP: When and how to use it.
Technical details
Use the VLOOKUP function to look up a value in a table.
Syntax
VLOOKUP (lookup_value, table_array, col_index_num, [range_lookup])
For example:
=VLOOKUP(105,A2:C7,2,TRUE)
=VLOOKUP("Fontana",B2:E7,2,FALSE)
lookup_value (required)
The value you want to look up. The value you want to look up must be in the first column of the range of cells you specify in table-array .
For example, if table-array spans cells B2:D7, then your lookup_value must be in column B. See the graphic below. Lookup_value can be a value or a reference to a cell.
table_array (required)
The range of cells in which the VLOOKUP will search for the lookup_value and the return value.
The first column in the cell range must contain the lookup_value (for example, Last Name in the picture below.) The cell range also needs to include the return value (for example, First Name in the graphic below) you want to find.
Learn how to select ranges in a worksheet.
col_index_num (required)
The column number (starting with 1 for the left-most column of table-array) that contains the return value.
range_lookup (optional)
A logical value that specifies whether you want VLOOKUP to find an approximate or an exact match:
TRUE assumes the first column in the table is sorted either numerically or alphabetically, and will then search for the closest value. This is the default method if you don't specify one.
FALSE searches for the exact value in the first column.
How to get started
There are four pieces of information that you will need in order to build the VLOOKUP syntax:
The value you want to look up, also called the lookup value.
The range where the lookup value is located. Remember that the lookup value should always be in the first column in the range for VLOOKUP to work correctly. For example, if your lookup value is in cell C2 then your range should start with C.
The column number in the range that contains the return value. For example, if you specify B2: D11 as the range, you should count B as the first column, C as the second, and so on.
Optionally, you can specify TRUE if you want an approximate match or FALSE if you want an exact match of the return value. If you don't specify anything, the default value will always be TRUE or approximate match.
Now put all of the above together as follows:
=VLOOKUP(lookup value, range containing the lookup value, the column number in the range containing the return value, optionally specify TRUE for approximate match or FALSE for an exact match).
Excel操作之VLOOKUP的更多相关文章
- Excel操作之VLOOKUP函数
1.作用 VLOOKUP函数是Excel中的一个纵向查找函数,它与LOOKUP函数和HLOOKUP函数属于一类函数,在工作中都有广泛应用,例如可以用来核对数据,多个表格之间快速导入数据等函数功能.功能 ...
- Npoi导入导出Excel操作
之前公司的一个物流商系统需要实现对订单的批量导入和导出,翻阅了一些资料,最后考虑使用NPOI实现这个需求. 在winform上面实现excel操作:http://www.cnblogs.com/Cal ...
- Delphi Excel 操作大全
Delphi Excel 操作大全 (一) 使用动态创建的方法首先创建 Excel 对象,使用ComObj:var ExcelApp: Variant;ExcelApp := CreateOleObj ...
- C#EXCEL 操作类--C#ExcelHelper操作类
主要功能如下1.导出Excel文件,自动返回可下载的文件流 2.导出Excel文件,转换为可读模式3.导出Excel文件,并自定义文件名4.将数据导出至Excel文件5.将指定的集合数据导出至Exce ...
- Excel 操作类
转载:http://www.cnblogs.com/fellowcheng/archive/2010/08/21/1805158.html ExcelHelper(Excel2007) Code hi ...
- C# excel操作
开源的Excel操作项目: http://www.cnblogs.com/lwme/archive/2011/11/27/2265323.html 添加引用:Microsoft Excel 11.0 ...
- [Excel操作]Microsoft Office Excel 不能访问文件
最近,客户服务器迁移,因操作系统环境变化而引起的的环境问题一堆,遇到的问题并解决方法在“[Excel]操作”类别会体现. Microsoft Office Excel 不能访问文件“C:\\LMSEx ...
- C#常用工具类——Excel操作类
/// 常用工具类——Excel操作类 /// <para> ------------------------------------------------</para> / ...
- 报表中的Excel操作之Aspose.Cells(Excel模板)
原文:报表中的Excel操作之Aspose.Cells(Excel模板) 本篇中将简单记录下Aspose.Cells这个强大的Excel操作组件.这个组件的强大之处,就不多说,对于我们的报表总是会有导 ...
随机推荐
- [Chromium]怎样安全的使用PostTask
PostTask參数决策树 怎样传递绑定的对象 官方的解释总是最权威.有疑问看这里或者直接看代码中的说明: bind_helpers.h. 传值方式 描写叙述 this 或 对象指针 假设对象本身是一 ...
- c++友元实现操作符重载
运算符重载的本质是一个函数 #include <iostream> using namespace std; class A { private: int m_a; int m_b; fr ...
- 十分钟掌握diff&patch用法
作为程序员,了解diff&patch命令是非常必要的.比如说我们发现某个项目有bug代码,而自己又没有svn的提交权限,那么此时最合适的解决方法就是用diff命令做一个补丁发给项目成员.项目成 ...
- caffe中LetNet-5卷积神经网络模型文件lenet.prototxt理解
caffe在 .\examples\mnist文件夹下有一个 lenet.prototxt文件,这个文件定义了一个广义的LetNet-5模型,对这个模型文件逐段分解一下. name: "Le ...
- 移动端1px细线问题
1可以用伪类实现 .con{position: relative;.con:before { content: " "; position: absolute; left: 0; ...
- Android RecyclerView 设置item间隔的方法
RecyclerView大家常用,但是如何给加载出来的item增加间隔很多人都不知道,下面是方法,直接上代码了: LinearLayoutManager layoutManager = new Lin ...
- ASP.NET使用MergeInto做数据同步,同步SQLSERVER不同数据库的相同表结构的数据
public string SynchronousData() { ReturnJson Rejson = new ReturnJson(); //将WebConfig中的数据库连接name中的值写进 ...
- js语法之条件语句
一.比较操作符 比较操作符包括:等于(==).大于(>).大于等于(>=).小于(<).小于等于(<=).
- Map和WeakMap的区别
个人总结:在一个变量作用域中,如果结束到作用域结尾 } 的话,map中的引用会被垃圾回收机制回收的是weakmap ,map中的引用不会被垃圾回收机制回收的是map. 强引用:只要引用存在,垃圾回收器 ...
- 【BZOJ2006】【NOI2010】超级钢琴
题意: Description 小Z是一个小有名气的钢琴家,最近C博士送给了小Z一架超级钢琴,小Z希望能够用这架钢琴创作出世界上最美妙的音乐. 这架超级钢琴可以弹奏出n个音符,编号为1至n.第i个音符 ...