完全にエクセル函数を頭に入れた人用の「セルの入力からグラフの作成まですべてをコマンド入力だけで済ませるプラグイン」みたいなのをつくろうかと思っている。
Created
May 17, 2019 06:20
-
-
Save YuukiToriyama/160d36924820b13559414a1f93df60ff to your computer and use it in GitHub Desktop.
構想A
セルA1に入力されているのが式なのかそうでないのか調べる方法
HasFormulaメソッド
Range("A1").HasFormula
はA1が式の場合True
を、そうでない場合False
を返します。
TypeName函数
TypeName(obj)
は変数やオブジェクトの型を返します。
サンプルコード覚書
If Range("A1").HasFormula = True Then
debug.print "A1 is a formula.\n"
else
If TypeName(Range("A1").value) = String Then
debug.print "A1 is String."
Else
debug.print "それ以外\n"
End If
End If
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
入力された文字列が式であるか数値であるかを判別するにはどうしたらいいのだろう。