0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

アルファベットを数字に変換

Posted at

アルファベットを数字に変換するといえばよく見るのが、このようにCOLUMNとINDIRECTを組み合わせたもの

=COLUMN(INDIRECT("C1"))

私も多用していたのですが、INDIRECTがとにかく重い。
SS上の全てのINDIRECT関数を別関数に置き換える必要が出て、こう変更ました。

=SEARCH("C", "ABCDEFGHIJKLMNOPQRSTUVWXYZ")

いや確かにバカっぽいんですけど、INDIRECT使うよりはマシだと思ってます。
INDIRECT重すぎる。COLUMNも多用したくない。

ABCD…を直接入力したら間違いも起こりそうなので、例えば設定シートなどに1セルずつA、B、C、、、と入力しておき、同じくSEARCH関数で探すとスマートな気がします。

GASで[A, B, C, ,,,]のような配列を定義してn番目を引っ張ってくるのとやっていることは同じですし。

0
0
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
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?