excel中如何用公式判断质数和合数
时间:2023-02-19 12:06:44
在Excel中,如果要判断A1单元格中的数值为质数或合数,可以用下面的数组公式:
=IF(OR(A1=1,A1=2,A1=3),"质数",IF(AND((MOD(A1,ROW(INDIRECT("2:"&A1-1)))<>0)),"质数","合数"))
该公式为数组公式,公式输入完毕后按Ctrl+Shift+Enter结束。另外,这个公式能判断的最大数值在Excel 2003中为65537,在Excel 2007中为1048577。
标签:公式,判断,合数,质数,Excel函数
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
Win10 RS5预览版17650今日推送 更新内容汇总
2023-01-06 20:31:34
![](https://img.aspxhome.com/file/2023/29/a260389_0s.jpg)
Mac怎么修改默认邮箱 苹果Mac系统更改默认邮箱设置图文教程
2022-08-30 10:34:33
![](https://img.aspxhome.com/file/2023/8/a214728_0s.png)
WPS+云办公如何创建安全团队?
2022-11-21 07:43:17
![](https://img.aspxhome.com/file/2023/3/a184873_0s.png)
WPS表格中WEEKDAY函数的使用方法
2023-08-14 15:08:44
Excel中进行表格设置每页都能打印表格标题行的操作方法
2023-05-23 02:47:50
Win10升级要卸载virtualbox virtualbox怎么办?
2023-04-13 01:48:55
![](https://img.aspxhome.com/file/2023/1/a273357_0s.png)
台式电脑只有USB2.0接口怎么办 升级USB3.0扩展卡安装方法
2023-07-29 16:47:50
![](https://img.aspxhome.com/file/2023/3/a295291_0s.jpg)
Excel中NEGBINOMDIST函数的语法和用法
2023-09-19 22:55:30
![](https://img.aspxhome.com/file/2023/5/a155975_0s.png)
Win10系统笔记本电脑卡住不动怎么办?Win10电脑桌面卡死了怎么解决?
2022-08-19 00:33:42
![](https://img.aspxhome.com/file/2023/26/a219534_0s.jpeg)
无法定位程序输入点于shell32.dll_无法定位程序输入点于shell32.dll解决方法
2022-04-03 17:09:04
![](https://img.aspxhome.com/file/2023/3/a299869_0s.jpg)
WPS如何设置数字自动输入的方法操作教学
2022-07-06 07:12:49
![](https://img.aspxhome.com/file/2023/3/a182493_0s.jpg)
电脑版wps表格如何插入雷达图
2023-07-01 16:36:26
![](https://img.aspxhome.com/file/2023/7/a184027_0s.png)
win10平板模式怎么触屏_ win10平板模式开启触屏方法
2023-08-26 05:44:28
![](https://img.aspxhome.com/file/2023/2/a286166_0s.jpg)
excel表格里的内容怎么打印不全
2022-02-19 11:25:16
Excel怎么选择岗位为工程师和助工的员工信息
2022-04-22 05:39:06
![](https://img.aspxhome.com/file/2023/2/a153922_0s.png)
Win7系统怎么修复IE?Win7系统修复IE浏览器的方法
2022-07-04 20:59:15
![](https://img.aspxhome.com/file/2023/27/a232052_0s.jpg)
excel计算时间差公式的用法
2023-05-30 04:31:50
一个简单操作,就可以看出excel菜鸟和高手的区别
2022-11-14 21:16:01
![](https://img.aspxhome.com/file/2023/2/a141222_0s.jpg)
网易mumu模拟器修改分辨率的具体操作方法
2023-05-31 12:23:48
![](https://img.aspxhome.com/file/2023/8/a338770_0s.jpg)
XP系统网页打不开怎么办?
2022-05-17 01:04:02
![](https://img.aspxhome.com/file/2023/4/a309699_0s.png)