OFFSET函数使用示例:大量数据中查找指定数据
时间:2023-05-06 03:22:05
学习群里有朋友问了一个问题,刚好,拿来做示例,来看看offset函数的妙用。
数据精简如下:
要求:
指定两个ID,在所有的ID区域里查找这两个ID是否存在,所有的ID区域有500行、500列。
解决方法公式实现
在B4单元格输入公式:
=IF(COUNTIF(OFFSET(D5,0,0,500,500),A4)<>0,”有”,”无”)
即可查出第一个ID是有还是无,公式向下填充,可得第二个ID的有无情况。
公式解释
OFFSET(D5,0,0,500,500):
以D2为基准点,向下偏移0行,向右偏移0列,再取高为500行、宽为500列的区域。
本部分是得到以D2为起始单元格的500行500列的区域。
COUNTIF(OFFSET(D5,0,0,500,500),A4):
在上述500行500列的所有ID区域内,查找A4单元格的ID。
(此种用OFFSET偏移到500行500列区域的方式,代替了传统的手工取选区域的方式,避免了不知道D列以后500列到底是哪列的尴尬)
IF(COUNTIF(OFFSET(D5,0,0,500,500),A4)<>0,”有”,”无”):
如果查找到的A4单元格中的ID个数不为零,则返回“有”,否则返回“无”。
标签:Excel函数,excel函数公式,excel表格制作,Excel教程
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
Win8系统运行程序提示"占位程序接收到错误数据"的故障原因及解决方法
2022-03-14 14:04:28
![](https://img.aspxhome.com/file/2023/28/a244992_0s.png)
word从网上复制的文档,经常会出现向下的灰色箭头,这是怎么回事?
2022-06-04 07:22:38
![](https://img.aspxhome.com/file/2023/3/32433_0s.jpg)
如何去掉Win8任务栏半透明效果窗口风格保持一致
2023-11-14 00:34:57
![](https://img.aspxhome.com/file/2023/29/a258115_0s.jpg)
Win10系统电脑怎么设置电脑休眠时间?
2023-11-23 15:15:09
![](https://img.aspxhome.com/file/2023/8/50208_0s.png)
如何将iTunes DRM-ed M4P转换为MP3?
2022-11-19 10:34:25
![](https://img.aspxhome.com/file/2023/2/a212842_0s.jpg)
excel中分列功能教程
2023-05-20 15:25:17
WPS excel如何利用AVERAGEIFS函数计算多条件的平均值
2022-01-18 08:41:08
![](https://img.aspxhome.com/file/2023/1/a184921_0s.png)
WPS word如何批量创建多个文件夹
2022-10-29 05:27:00
![](https://img.aspxhome.com/file/2023/6/a184996_0s.png)
excel表格中怎么输入黑色三角符号?
2023-12-14 09:03:56
![](https://img.aspxhome.com/file/2023/2/a141602_0s.jpg)
Win10系统字体怎么更改?更改Win10系统默认字体的方法
2022-05-21 17:11:41
![](https://img.aspxhome.com/file/2023/25/a218199_0s.png)
如何更新声卡驱动?声卡驱动的更新教程
2022-05-10 04:56:53
![](https://img.aspxhome.com/file/2023/6/a320902_0s.jpg)
Win8应用商店管理小工具具体功能详细介绍
2022-08-28 09:19:35
![](https://img.aspxhome.com/file/2023/29/a258200_0s.png)
Win10专业版系统出现fltmgr.sys蓝屏错误代码要怎么解决
2022-11-02 17:36:04
![](https://img.aspxhome.com/file/2023/26/a223600_0s.png)
excel如何同时设置多个工作表的单元格显示或隐藏零值
2022-02-23 12:01:12
Win10登陆Xbox出现错误代码0x800488AB怎么办?
2022-08-01 04:18:16
![](https://img.aspxhome.com/file/2023/28/a248153_0s.jpg)
如何在Microsoft Word中添加图表
2023-02-22 15:32:47
![](https://img.aspxhome.com/file/2023/4/23754_0s.jpg)
win10系统设置安全搜索等级为严格的方法
2022-01-29 18:53:53
![](https://img.aspxhome.com/file/2023/29/a262080_0s.jpeg)
windows10设置电子邮件和日历方法介绍
2022-12-04 07:34:02
![](https://img.aspxhome.com/file/2023/4/a306189_0s.jpg)
excel表格内单元格关联功能怎么用
2023-04-23 21:30:40
车轮社区APP如何调整字体大小 车轮社区APP调整字体大小的方法
2022-01-18 00:58:02
![](https://img.aspxhome.com/file/2023/8/a335173_0s.png)