2000年的时候,刚参加工作不久,我是干付款的,而且是外企,付外汇,一笔付款要三张银行单据,而且是电子制造业,供应商特多,公司原来是用打字机(不是打印机)打印单据,容易出错不说,效率还特低。 干了一段时间受不了了,就想偷懒,试着用EXCEL97做一个打印模板,但是在中文和英文大写这里碰到了麻烦,经过漫长的研究(大概三个月吧,时间比较长,一是因为刚学EXCEL,二是因为用工作空闲时间做的),终于完工: 中文大写:=IF(W!F10=0,"",IF(W!E10="USD",CONCATENATE("美元",IF(ISNUMBER(W!H7),VLOOKUP(W!H7,D!A13:B22,2),""),IF(AND(W!I7>=1,W!I7<=9),VLOOKUP(W!I7,D!D1:E11,2),IF(AND(W!H7>=1,W!H7<=9,W!J7>=1,W!J7<=9),"零","")),IF(AND(W!J7>=1,W!J7<=9),VLOOKUP(W!J7,D!G1:H11,2),IF(SUM(J)=0,"万",IF(AND(SUM(J)>0,ISNUMBER(W!J7)),"万零",""))),IF(AND(W!K7>=1,W!K7<=9),VLOOKUP(W!K7,D!D13:E22,2),IF(AND(SUM(K)>0,W!J7>=1,W!J7<=9),"零","")),IF(AND(W!L7>=1,W!L7<=9),VLOOKUP(W!L7,D!A13:B22,2),IF(AND(W!K7>=1,W!K7<=9,SUM(F)>0),"零","")),IF(AND(W!N7>=1,W!N7<=9),VLOOKUP(W!N7,D!D1:E11,2),IF(AND(W!L7>=1,W!L7<=9,W!O7>=1,W!O7<=9),"零","")),IF(ISNUMBER(W!O7),VLOOKUP(W!O7,D!J13:K22,2),""),IF(SUM(I)=0,"整",""),IF(AND(W!P7=0,W!Q7>0),"零",""),IF(SUM(I)=0,"",VLOOKUP(W!P7,D!G13:H22,2)),IF(W!E10="USD",VLOOKUP(W!Q7,D!J1:K11,2),"")),"")) 英文大写:=IF(OR(W!E10="RMB",W!F10=0),"",CONCATENATE("SAY ",W!E10," ",IF(ISNUMBER(W!H7),VLOOKUP(W!H7,D!M1:N11,2),""),IF(ISNUMBER(W!H7),"MILLION ",""),IF(ISNUMBER(W!I7),VLOOKUP(W!I7,D!M1:N11,2),""),IF(W!I7=0,"",IF(ISNUMBER(W!I7),"HUNDRED ","")),IF(AND(ISNUMBER(W!I7),SUM(A)>0),"AND ",""),IF(D!N14=0,"",IF(D!N14<10,VLOOKUP(W!K7,D!M1:N11,2),IF(D!N14<20,VLOOKUP(W!K7,D!P1:Q11,2),VLOOKUP(W!J7,D!P13:Q21,2)))),IF(D!N14>19,VLOOKUP(W!K7,D!M1:N11,2),""),IF(SUM(B)>0,"THOUSAND ",""),IF(ISNUMBER(W!L7),VLOOKUP(W!L7,D!M1:N11,2),""),IF(W!L7=0,"",IF(ISNUMBER(W!L7),"HUNDRED ","")),IF(AND(ISNUMBER(W!L7),SUM(F)>0),"AND ",""),IF(D!N15=0,"",IF(D!N15<10,VLOOKUP(W!O7,D!M1:N11,2),IF(D!N15<20,VLOOKUP(W!O7,D!P1:Q11,2),VLOOKUP(W!N7,D!P13:Q21,2)))),IF(D!N15>19,VLOOKUP(W!O7,D!M1:N11,2),""),IF(SUM(I)>0,"AND CENTS ","ONLY"),IF(D!N16=0,"",IF(D!N16<10,VLOOKUP(W!Q7,D!M1:N11,2),IF(D!N16<20,VLOOKUP(W!Q7,D!P1:Q11,2),VLOOKUP(W!P7,D!P13:Q21,2)))),IF(D!N16>19,VLOOKUP(W!Q7,D!M1:N11,2),""),IF(D!N16>0,"ONLY",""))) 现在自己看着都害怕,像一堆乱码。 虽然EH是在1999年11月就成立了,我也是这个时候参加工作,但当时没条件上网,后来上了EH才知道原来有更好的解决方法。
RUcLlrho.rar
(15.79 KB, 下载次数: 299)
[此贴子已经被作者于2007-11-28 13:34:42编辑过] |