【タイ語学習】「タイ数字⇔アラビア数字⇒タイ文字」変換用のExcel関数
通常は役に立つ機会は少ないのですが、タイ語の教材をつくるときは結構便利です。
✅アラビア数字⇒タイ数字
=SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(A1,"1","๑"),"2","๒"),"3","๓"),"4","๔"),"5","๕"),"6","๖"),"7","๗"),"8","๘"),"9","๙"),"0","๐")
✅タイ数字⇒アラビア数字
=SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(A1,"๑","1"),"๒","2"),"๓","3"),"๔","4"),"๕","5"),"๖","6"),"๗","7"),"๘","8"),"๙","9"),"๐","0")
✅アラビア数字⇒タイ文字表記
=SUBSTITUTE(BAHTTEXT(A1),"บาทถ้วน","")
※Googleスプレッドシート使用の場合は、Excel関数の『BAHTTEXT関数』がないので、スクリプトエディタからmyFunctionを追加する必要があります。やり方は下記のページ(タイ語)を参照して下さい。
https://www.it24hrs.com/2015/bahttext-function-for-google-sheet-bahttext/