用于卡号验证的Luhn算法公式

时间:2019-06-23 19:39:26

标签: excel

我需要将此数组公式(Luhn算法)从16位更改为不确定位数:

=MOD(SUM(IF((MID(A6,ROW(INDIRECT("1:"&LEN(A6))),1))*MOD(ROW(INDIRECT("1:"&LEN(A6))),2) =0,0,MOD((MID(A6,ROW(INDIRECT("1:"&LEN(A6))),1))*MOD(ROW(INDIRECT("1:"&LEN(A6))),2)*2-1,9) +1)+(MID(A6,ROW(INDIRECT("1:"&LEN(A6))),1))*MOD(ROW(INDIRECT("1:"&LEN(A6)))-1,2)),10)=0

0 个答案:

没有答案