Excel使用VLOOKUP函数进行员工信息查询
时间:2023-02-27 21:32:17
图中右侧的表格展示了一份员工信息表,下面的公式将分别针对不同的查询条件从信息表中进行相应查询。
●B3单元格根据工号查找姓名公式
=VLOOKUP(B2,$D$1:$G$9,2)
由于D列员工号已经升序排列,因此第4个参数缺省(TRUE),则进行升序查找。
●D6单元格根据姓名查找部门公式
=VLOOKUP(B5,$E$1:$G$9,2)
由于E列姓名未进行排序,使用模糊匹配查找结果返回“#N/A”错误,因此应该使用精确匹配方式进行查找,第4个参数为0(或FALSE),公式修改如下:
=VLOOKUP(B5,$E$1:$G$9,2,0)
●B9单元格根据姓名查找职务公式:
=VLOOKUP(B8,$E$1:$G$9,3,0)
虽然使用精确查找,但由于该员工无职务,结果显示为0。为了使空单元格引用结果显示为空白,应该利用与空字符相连接的技巧,如公式修改如下:
=VLOOKUP(B8,$E$1:$G$9,3,0)&""
标签:公式,单元格,姓名,查找,Excel函数
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
Win7系统没有找到Comres.dll的解决方法
2022-05-01 13:39:49
![](https://img.aspxhome.com/file/2023/5/a314114_0s.jpg)
PowerPoint制作既艺术又实用的简历
2023-01-12 06:30:44
![](https://img.aspxhome.com/file/2023/10/a346586_0s.jpg)
win10隐藏特定格式文件要怎么隐藏?
2022-02-08 13:38:53
![](https://img.aspxhome.com/file/2023/8/53138_0s.gif)
Win10文件夹权限怎么解除 Win10文件权限解除的方法
2023-05-28 19:28:25
![](https://img.aspxhome.com/file/2023/28/a239849_0s.png)
闪电降价怎么确认收货?闪电降价确认收货的方法
2023-04-29 03:31:54
![](https://img.aspxhome.com/file/2023/8/a333146_0s.jpg)
怎么使用word2016打印?
2023-11-12 12:41:16
![](https://img.aspxhome.com/file/2023/0/17780_0s.jpg)
Win11 22H2安装失败怎么办?Win11 22H2更新失败解决方法
2022-09-27 12:41:00
![](https://img.aspxhome.com/file/2023/27/a234797_0s.png)
wps文字教程如何设置底纹颜色
2022-09-02 22:58:34
word怎么设置文章首句不出现标点符号?
2023-04-10 23:56:32
![](https://img.aspxhome.com/file/2023/3/24173_0s.jpg)
PPT中视图巧切换技巧
2022-08-04 12:38:13
excel if函数的使用方法
2023-11-02 16:46:46
![](https://img.aspxhome.com/file/2023/0/a162310_0s.png)
优化Windows7加快系统速度必做两件事
2022-02-20 11:53:08
![](https://img.aspxhome.com/file/2023/29/a258975_0s.png)
罗技驱动为什么无法识别鼠标?罗技驱动无法识别鼠标的解决方法
2022-07-04 18:51:46
![](https://img.aspxhome.com/file/2023/7/a327483_0s.jpg)
通过Google Chrome远程控制你的Windows10系统的方法
2023-03-16 00:32:15
![](https://img.aspxhome.com/file/2023/28/a242329_0s.jpg)
excel中标准差函数
2022-03-16 04:20:08
![](https://img.aspxhome.com/file/2023/9/42999_0s.gif)
如何直接在Apple Watch 上添加 Apple Pay 银行卡?
2023-01-24 10:59:01
![](https://img.aspxhome.com/file/2023/10/a343823_0s.png)
深度技术如何在使用彩色主题时让标题栏保持白色
2023-12-10 18:03:17
![](https://img.aspxhome.com/file/2023/2/a291146_0s.jpg)
Win10系统如何禁止应用访问电子邮件?
2023-03-21 06:32:40
![](https://img.aspxhome.com/file/2023/1/a279342_0s.png)
Mac设置共享扫描仪的步骤
2022-06-16 01:37:06
![](https://img.aspxhome.com/file/2023/1/a216321_0s.jpg)
excel表格打不开如何解决
2023-08-18 14:50:29