excel两个表,品号顺序不一样,如何计算差值?
时间:2023-08-29 05:59:04
如下图所示,左表为不同品号商品的原数量,右表为现数量,要求计算各品号原数量与现数量的差值。此数据计算的难点在于:两表中品号顺序不一致,不能直接同行相差。
公式实现在G2单元格输入公式:=IFERROR(B2-VLOOKUP(A2,D:E,2,0),”无此品号现数量”),按Enter键完成计算,然后公式向下填充,如果右表中有与左表中相同的品号,则可得原数量与现数量的差值;如果右表中没有与左表中相同的品号,则显示“无此品号现数量”。如下图:
公式解析VLOOKUP(A2,D:E,2,0):在D:E数据区域查找与A2单元格中的品号对应的现数量。B2-VLOOKUP(A2,D:E,2,0):用A2单元格中的品号对应的原数量减掉对应的现数量,即是差值。IFERROR(B2-VLOOKUP(A2,D:E,2,0),”无此品号现数量”):如果右表中有与左表相同的品号,则返回减值,如果没有,则返回无此品号现数量。
标签:Excel函数,excel函数公式,excel表格制作,Excel教程
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
解决Win7双硬盘自动关闭的问题的方法(图文教程)
2023-04-19 21:48:35
![](https://img.aspxhome.com/file/2023/29/a258922_0s.jpg)
WPS文档如何制作统一目录格式
2022-07-26 10:15:34
WinXP系统电脑运行卡慢的优化提速方法
2022-06-10 17:33:54
![](https://img.aspxhome.com/file/2023/4/a303906_0s.jpg)
火绒怎么快速查杀?火绒快速查杀教程分享
2022-09-01 04:51:10
![](https://img.aspxhome.com/file/2023/7/a330775_0s.jpg)
iOS 13.1 正式版更新了什么内容?iOS 13.1 正式版更新汇总
2023-09-25 18:39:10
![](https://img.aspxhome.com/file/2023/8/a196758_0s.jpg)
Windows 10系统下查看显卡配置的小技巧
2022-04-02 10:12:20
![](https://img.aspxhome.com/file/2023/26/a227766_0s.jpg)
如何使用 Apple Watch 跟踪睡眠时间和睡眠质量?
2022-09-28 23:16:52
![](https://img.aspxhome.com/file/2023/1/a204891_0s.jpeg)
电脑无法登录无线路由器设置界面怎么解决
2022-11-06 04:40:17
![](https://img.aspxhome.com/file/2023/3/a302846_0s.jpg)
Win10 RS2预览版中的便利贴更新 修复Bug增强性能
2023-02-28 22:51:17
![](https://img.aspxhome.com/file/2023/29/a260958_0s.jpg)
Mac电脑什么截图软件最好用?Snipaste for Mac实用截图教程
2022-03-17 07:36:52
![](https://img.aspxhome.com/file/2023/3/a214343_0s.png)
WPS excel输入数字自动添加“元整”
2022-10-14 17:22:17
![](https://img.aspxhome.com/file/2023/5/a186955_0s.jpg)
Win11鼠标漂移怎么办?Win11鼠标漂移解决方法
2022-04-03 23:21:56
![](https://img.aspxhome.com/file/2023/27/a236542_0s.jpg)
vac无法验证您的游戏会话csgo_vac验证您的游戏会话csgo的方法
2023-06-03 03:35:33
![](https://img.aspxhome.com/file/2023/2/a288712_0s.png)
华擎主板安全启动在哪 华擎Win11安全启动怎么开启
2022-07-27 05:57:57
![](https://img.aspxhome.com/file/2023/27/a235723_0s.png)
win10安装固态硬盘后开启AHCI后不能正常开机该怎么办?
2023-08-28 21:09:11
![](https://img.aspxhome.com/file/2023/28/a246709_0s.jpg)
笔记本键盘字母变成数字怎么办?
2022-10-18 14:53:58
![](https://img.aspxhome.com/file/2023/2/a291107_0s.png)
为什么 AirPower 迟迟无法面世?
2023-09-29 09:42:19
![](https://img.aspxhome.com/file/2023/9/a195509_0s.jpg)
excel表格里划斜线的方法
2023-09-16 00:20:40
Win7怎么彻底卸载IE浏览器?
2023-08-11 23:01:48
![](https://img.aspxhome.com/file/2023/27/a230770_0s.jpg)
Win10怎么禁止任务栏上显示快捷搜索框
2023-09-19 23:48:57
![](https://img.aspxhome.com/file/2023/29/a252025_0s.jpg)