假设A1中是学号,在B1中输入如下公式:=if(mod(mid(A1,4,1),2)=1,"男","女")
A1 = 123456B1=IF(ISODD(LEFT(A1,4)),"男","女")或者B1=IF(ISODD(MID(A1,4,1)),"男","女")
=IF(MOD(MID(A1,4,1),2),"男","女")