excel利用数组公式获取一列中最接近0的数
时间:2023-04-18 00:08:22
要获取某列数值中最接近0的数(绝对值最小但不等于0的数),在Excel中可以用下面的数组公式。假如数值在A1:A15区域,,其中包含正数、负数、0和空单元格,如图所示。
在C3单元格中输入数组公式:
=INDEX(A1:A15,MATCH(MIN(IF(A1:A15,ABS(A1:A15))),ABS(A1:A15),))
公式输入完毕按Ctrl+Shift+Enter结束,下同。
说明:“IF(A1:A15,ABS(A1:A15))”排除“0”和空单元格取得所有数值的绝对值,“0”和空单元格返回逻辑值“FALSE”,被MIN函数忽略。MATCH函数返回绝对值最小的数在列中的位置,最后用INDEX函数返回该数值。
要获取A列中最接近0的正数或负数,当数值全部为正数或负数时,直接用MIN或MAX函数即可,如果同时包含正数和负数和0,可用下面的数组公式:
获取图中A列中最接近0的正数:
=MIN(IF(A1:A15>0,A1:A15))
获取图中A列最接近0的负数:
=MAX(IF(A1:A15<0,A1:A15))
标签:公式,数值,正数,负数,Excel函数
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
Excel中带单位的数字如何计算
2023-02-23 21:24:18
![](https://img.aspxhome.com/file/2023/8/a140088_0s.jpg)
Win10专业版电脑电量图标不见了怎么办
2023-11-18 17:03:33
![](https://img.aspxhome.com/file/2023/7/49817_0s.png)
电脑时间总是不对怎么办?桌面时间老是差几分钟如何修复?
2023-11-03 01:35:18
![](https://img.aspxhome.com/file/2023/26/a225160_0s.jpg)
WinXP无法删除视频文件如果不是因为权限该如何处理
2022-11-19 11:10:23
![](https://img.aspxhome.com/file/2023/28/a249298_0s.jpg)
微软Surface Pro 3/2固件更新:提升Win10系统下显卡性能
2023-09-26 07:18:22
![](https://img.aspxhome.com/file/2023/28/a248053_0s.jpg)
Win10 Mobile RedStone预览版14283更新内容汇总
2022-11-14 10:26:41
![](https://img.aspxhome.com/file/2023/28/a245394_0s.jpg)
逗拍APP怎么关掉视频循环播放?逗拍APP关掉视频循环播放的方法
2022-12-03 15:08:56
![](https://img.aspxhome.com/file/2023/8/a334731_0s.jpg)
ppt自选图形如何旋转45度
2023-03-22 00:44:40
![](https://img.aspxhome.com/file/2023/1/a170101_0s.png)
但是数据少还好
2023-02-26 02:43:47
Windows7自带Update更新失败怎么解决?
2023-03-25 06:03:08
![](https://img.aspxhome.com/file/2023/27/a233577_0s.jpg)
怎么把excel2007两个工作表垂直
2023-11-24 20:30:02
faceu视频如何加入音乐 faceu视频添加音乐教程
2022-07-19 02:33:41
![](https://img.aspxhome.com/file/2023/8/a339374_0s.jpg)
如何在Win10系统下开启文件历史记录功能
2023-09-18 08:29:46
![](https://img.aspxhome.com/file/2023/26/a227563_0s.jpg)
Win10安装程序遇到错误0x800f0905怎么解决?
2022-03-15 01:13:48
![](https://img.aspxhome.com/file/2023/26/a219269_0s.jpg)
用Excel处理经典"鸡兔疑难"地五种办法
2022-09-30 05:57:29
![](https://img.aspxhome.com/file/2023/7/38887_0s.jpg)
Win10 Mobile/PC一周年14393.105有望成为下一个累积更新
2023-07-21 23:16:29
![](https://img.aspxhome.com/file/2023/28/a243720_0s.jpg)
如何让Win10文件夹始终显示功能区有哪些方法
2023-07-06 06:51:13
![](https://img.aspxhome.com/file/2023/28/a250967_0s.jpg)
excel 公式输入小技巧
2023-02-09 19:45:43
![](https://img.aspxhome.com/file/2023/2/a163192_0s.jpg)
Win8系统开始屏幕左上角显示Start#ZHS怎么去除
2022-12-24 13:42:45
![](https://img.aspxhome.com/file/2023/3/a302352_0s.jpg)
excel表格怎么限制输入内容
2022-12-22 10:35:54