VBAでセルに設定されている数式を取得する方法
セルに入力されている値(文字)を取得するのは簡単ですね。
セルの値取得(例)
プロパティ | 取得値 |
---|---|
xsSht.Range(“A1”).Value | 値そのもの |
xsSht.Range(“A1”).Text | 表示値(フォーマットなど見たまま) |
xsSht.Range(“A1”).Value2 | シリアル値(日付など) |
xsSht.Range(“A1”).Formula | 数式 |
プロパティ | 取得値 |
---|---|
xsSht.Range(“A1”).Value | 値そのもの |
xsSht.Range(“A1”).Text | 表示値(フォーマットなど見たまま) |
xsSht.Range(“A1”).Value2 | シリアル値(日付など) |
xsSht.Range(“A1”).Formula | 数式 |