本文主要是介绍如何在Excel中使用公式将生日自动转换成星座?,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
Excel中生日转换成星座的方法
最近在做一张通讯录表格,想实现将出生日期自动转换成星座,通过在网络上找到了将生日转换成星座的公式,在此和大家共享此方法:
先上张效果图:
Excel计算星座公式一:
=LOOKUP(--TEXT(C3,"mdd"),{101,"摩羯座";120,"水瓶座";219,"双鱼座";321,"白羊座";420,"金牛座";521,"双子座";621,"巨蟹座";723,"狮子座";823,"处女座";923,"天秤座";1023,"天蝎座";1122,"射手座";1222,"摩羯座"})
Excel计算星座公式二:
=LOOKUP(--TEXT(C4,"m.dd"),{1.01,1.21,2.19,3.21,4.21,5.21,6.22,7.23,8.23,9.23,10.23,11.22,12.22},{"魔羯座","水瓶座","双鱼座","白羊座","金牛座","双子座","巨蟹座","狮子座","处女座","天秤座","天蝎座","射手座","魔羯座"})
Excel计算星座公式三::
=VLOOKUP(MAX(21,DATE(1900,MONTH(C5),DAY(C5))),{21,"水瓶座";51,"双鱼座";81,"牧羊座";112,"金牛座";143,"双子座";174,"巨蟹座";206,"狮子座";237,"处女座";268,"天秤座";297,"天蝎座";328,"射手座";357,"魔羯座"},2,1)
以上。
这篇关于如何在Excel中使用公式将生日自动转换成星座?的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!