0
1

rex0220 計算式プラグイン 郵便番号の nnn-nnnn 自動変換

Last updated at Posted at 2024-02-03

計算式プラグインで郵便番号を nnn-nnnn 形式に自動変換します。

概要

郵便番号を nnn-nnnn 形式に統一したい場合、計算式プラグインで自動変換できます。

2024-02-03_12h33_50.png

操作例

2024-02-03_12h50_44.gif

計算式プラグイン設定

「循環参照を許可」をチェックし、郵便番号の計算式を設定します。

  • 郵便番号の計算式
    文字列を半角変換し、数字以外を削除、"-" を追加します。
    数字が7文字以上の場合は、そのままにしています。

2024-02-03_12h40_53.png

.js
// 郵便番号 SINGLE_LINE_TEXT (editable)
LET(w,REPLACERE(ASC(郵便番号),"[^0-9]","g",""),
  IF(LENGTH(w)>3,LEFT(w,3)&"-"&SLICE(w,3),w),
)
0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1