早教吧 育儿知识 作业答案 考试题库 百科 知识分享

=IF(MOD(MOD(A1-1,9)+1,2),"合单","合双")这方法出错了,谁能把这公式完善起来?在19出来的结果错,接下来错在28,29,再接下来错在37,38,39,再接下来错在46,47,48,49,再接下来错在55,56,57,58,59再接下来错.合单

题目详情
=IF(MOD(MOD(A1-1,9)+1,2),"合单","合双") 这方法出错了,谁能把这公式完善起来?
在19出来的结果错,接下来错在28,29,再接下来错在37,38,39,再接下来错在46,47,48,49,再接下来错在55,56,57,58,59再接下来错.
合单是:1,3,5,7,9,10,12,14,16,18,21,23,25,27,29,30,32,34,36,38,41,43,45,47,49,50,52.
合双是:2,4,6,8,11,13,15,17,19,20,22,24,26,28,31,33,35,37,39,40,42,44,46,48,51.
=IF(OR(A1={1,3,5,7,9,10,12,14,16,18}),"合单","合双") 目前这条公式可用的,但是如果A列的数字大到上百的时候,这公式就用不了啦!
▼优质解答
答案和解析
=TEXT(-1^SUM(--(0&MID(A2,{1,2},1))),"合双;合单")
如果上百,又有什么规律,如果还是逐位相加为单或双,公式改为
=TEXT(-1^SUM(--(0&MID(A2,{1,2,3},1))),"合双;合单")