excel函数,求大神帮忙解决

左数第二个数字如果是质数在I列显示质数,如果是合数在J列显示合数,谢谢... 左数第二个数字如果是质数在I列显示质数,如果是合数在J列显示合数,谢谢 展开
 我来答
百度网友6382c60
2013-08-12 · TA获得超过548个赞
知道小有建树答主
回答量:649
采纳率:100%
帮助的人:213万
展开全部
如果添加辅助列是可以达到你的要求的,因为公式太长了,不要辅助列的话超过了excel的限制,主要是麻烦在要判断每行的第二个数据上,导致公式加长,设定K列为辅助列,在K列中输入公式:VALUE(LEFT(RIGHT(IF(FIND(":",CONCATENATE(IF(A2="","",A2),IF(B2="","",":"&B2),IF(C2="","",":"&C2),IF(D2="","",":"&D2),IF(E2="","",":"&E2),IF(F2="","",":"&F2),IF(G2="","",":"&G2),IF(H2="","",":"&H2)))=1,RIGHT(CONCATENATE(IF(A2="","",A2),IF(B2="","",":"&B2),IF(C2="","",":"&C2),IF(D2="","",":"&D2),IF(E2="","",":"&E2),IF(F2="","",":"&F2),IF(G2="","",":"&G2),IF(H2="","",":"&H2)),LEN(CONCATENATE(IF(A2="","",A2),IF(B2="","",":"&B2),IF(C2="","",":"&C2),IF(D2="","",":"&D2),IF(E2="","",":"&E2),IF(F2="","",":"&F2),IF(G2="","",":"&G2),IF(H2="","",":"&H2)))-1),CONCATENATE(IF(A2="","",A2),IF(B2="","",":"&B2),IF(C2="","",":"&C2),IF(D2="","",":"&D2),IF(E2="","",":"&E2),IF(F2="","",":"&F2),IF(G2="","",":"&G2),IF(H2="","",":"&H2))),LEN(IF(FIND(":",CONCATENATE(IF(A2="","",A2),IF(B2="","",":"&B2),IF(C2="","",":"&C2),IF(D2="","",":"&D2),IF(E2="","",":"&E2),IF(F2="","",":"&F2),IF(G2="","",":"&G2),IF(H2="","",":"&H2)))=1,RIGHT(CONCATENATE(IF(A2="","",A2),IF(B2="","",":"&B2),IF(C2="","",":"&C2),IF(D2="","",":"&D2),IF(E2="","",":"&E2),IF(F2="","",":"&F2),IF(G2="","",":"&G2),IF(H2="","",":"&H2)),LEN(CONCATENATE(IF(A2="","",A2),IF(B2="","",":"&B2),IF(C2="","",":"&C2),IF(D2="","",":"&D2),IF(E2="","",":"&E2),IF(F2="","",":"&F2),IF(G2="","",":"&G2),IF(H2="","",":"&H2)))-1),CONCATENATE(IF(A2="","",A2),IF(B2="","",":"&B2),IF(C2="","",":"&C2),IF(D2="","",":"&D2),IF(E2="","",":"&E2),IF(F2="","",":"&F2),IF(G2="","",":"&G2),IF(H2="","",":"&H2))))-FIND(":",IF(FIND(":",CONCATENATE(IF(A2="","",A2),IF(B2="","",":"&B2),IF(C2="","",":"&C2),IF(D2="","",":"&D2),IF(E2="","",":"&E2),IF(F2="","",":"&F2),IF(G2="","",":"&G2),IF(H2="","",":"&H2)))=1,RIGHT(CONCATENATE(IF(A2="","",A2),IF(B2="","",":"&B2),IF(C2="","",":"&C2),IF(D2="","",":"&D2),IF(E2="","",":"&E2),IF(F2="","",":"&F2),IF(G2="","",":"&G2),IF(H2="","",":"&H2)),LEN(CONCATENATE(IF(A2="","",A2),IF(B2="","",":"&B2),IF(C2="","",":"&C2),IF(D2="","",":"&D2),IF(E2="","",":"&E2),IF(F2="","",":"&F2),IF(G2="","",":"&G2),IF(H2="","",":"&H2)))-1),CONCATENATE(IF(A2="","",A2),IF(B2="","",":"&B2),IF(C2="","",":"&C2),IF(D2="","",":"&D2),IF(E2="","",":"&E2),IF(F2="","",":"&F2),IF(G2="","",":"&G2),IF(H2="","",":"&H2))))),FIND(":",RIGHT(IF(FIND(":",CONCATENATE(IF(A2="","",A2),IF(B2="","",":"&B2),IF(C2="","",":"&C2),IF(D2="","",":"&D2),IF(E2="","",":"&E2),IF(F2="","",":"&F2),IF(G2="","",":"&G2),IF(H2="","",":"&H2)))=1,RIGHT(CONCATENATE(IF(A2="","",A2),IF(B2="","",":"&B2),IF(C2="","",":"&C2),IF(D2="","",":"&D2),IF(E2="","",":"&E2),IF(F2="","",":"&F2),IF(G2="","",":"&G2),IF(H2="","",":"&H2)),LEN(CONCATENATE(IF(A2="","",A2),IF(B2="","",":"&B2),IF(C2="","",":"&C2),IF(D2="","",":"&D2),IF(E2="","",":"&E2),IF(F2="","",":"&F2),IF(G2="","",":"&G2),IF(H2="","",":"&H2)))-1),CONCATENATE(IF(A2="","",A2),IF(B2="","",":"&B2),IF(C2="","",":"&C2),IF(D2="","",":"&D2),IF(E2="","",":"&E2),IF(F2="","",":"&F2),IF(G2="","",":"&G2),IF(H2="","",":"&H2))),LEN(IF(FIND(":",CONCATENATE(IF(A2="","",A2),IF(B2="","",":"&B2),IF(C2="","",":"&C2),IF(D2="","",":"&D2),IF(E2="","",":"&E2),IF(F2="","",":"&F2),IF(G2="","",":"&G2),IF(H2="","",":"&H2)))=1,RIGHT(CONCATENATE(IF(A2="","",A2),IF(B2="","",":"&B2),IF(C2="","",":"&C2),IF(D2="","",":"&D2),IF(E2="","",":"&E2),IF(F2="","",":"&F2),IF(G2="","",":"&G2),IF(H2="","",":"&H2)),LEN(CONCATENATE(IF(A2="","",A2),IF(B2="","",":"&B2),IF(C2="","",":"&C2),IF(D2="","",":"&D2),IF(E2="","",":"&E2),IF(F2="","",":"&F2),IF(G2="","",":"&G2),IF(H2="","",":"&H2)))-1),CONCATENATE(IF(A2="","",A2),IF(B2="","",":"&B2),IF(C2="","",":"&C2),IF(D2="","",":"&D2),IF(E2="","",":"&E2),IF(F2="","",":"&F2),IF(G2="","",":"&G2),IF(H2="","",":"&H2))))-FIND(":",IF(FIND(":",CONCATENATE(IF(A2="","",A2),IF(B2="","",":"&B2),IF(C2="","",":"&C2),IF(D2="","",":"&D2),IF(E2="","",":"&E2),IF(F2="","",":"&F2),IF(G2="","",":"&G2),IF(H2="","",":"&H2)))=1,RIGHT(CONCATENATE(IF(A2="","",A2),IF(B2="","",":"&B2),IF(C2="","",":"&C2),IF(D2="","",":"&D2),IF(E2="","",":"&E2),IF(F2="","",":"&F2),IF(G2="","",":"&G2),IF(H2="","",":"&H2)),LEN(CONCATENATE(IF(A2="","",A2),IF(B2="","",":"&B2),IF(C2="","",":"&C2),IF(D2="","",":"&D2),IF(E2="","",":"&E2),IF(F2="","",":"&F2),IF(G2="","",":"&G2),IF(H2="","",":"&H2)))-1),CONCATENATE(IF(A2="","",A2),IF(B2="","",":"&B2),IF(C2="","",":"&C2),IF(D2="","",":"&D2),IF(E2="","",":"&E2),IF(F2="","",":"&F2),IF(G2="","",":"&G2),IF(H2="","",":"&H2))))))-1))
以下公式是数组公式,按ctrl+shift+enter结束输入
再在I2中输入公式:=IF(AND(k2>=2,N2=INT(k2)),IF(SUM(--(MOD(k2,ROW(INDIRECT("1:"&INT(SQRT(k2)))))=0))>1,"","质数"),"")
再在j2中输入公式:=IF(AND(k2>=2,N2=INT(k2)),IF(SUM(--(MOD(k2,ROW(INDIRECT("1:"&INT(SQRT(k2)))))=0))>1,"合数",""),"")
然后向下复制公式即可
lu_zhao_long
2013-08-12 · TA获得超过1.3万个赞
知道大有可为答主
回答量:1.3万
采纳率:79%
帮助的人:2593万
展开全部
Excel 好像没有提供这样的函数,需要自己写自定义函数才解决了。
追问

那这个问题没办法解决了,我再问你另一个问题吧,我上张图,我希望就是后面显示语数比能以公式来实现,不要手动输入

已赞过 已踩过<
你对这个回答的评价是?
评论 收起
苗圩Q
2013-08-12 · 贡献了超过107个回答
知道答主
回答量:107
采纳率:0%
帮助的人:21.8万
展开全部
12、17、23、2、7、17、23是质数,其余是合数
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
收起 更多回答(1)
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式