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?

VBAを始める前に知っておくと楽になる事

Last updated at Posted at 2025-09-28

VBAを始めようと思う理由、VBAでやりたい事のほとんどは
「集計作業を自動化したい」
事だと思います。
もしVBAでやりたい事が高度な集計作業であるなら、VBAではなく、Excelの標準機能であるPowerQueryを初めてください。
VBAには表の集計機能は全くありません。
VBAでの計算や文字列の加工は、

Range("A1")
Cells(1,1)

という様に、1セルずつの操作しかなく、何をするにしても延々とループ作業のコードを書く必要があります。
その他にもVBAで高速処理を行うには2次配列の知識が必須です。

Range("A1")
Cells(1,1)

は非常に遅く、使い物になりません。
またVBAはプログラミング言語なのでオブジェクトの知識が必要だったり、非常に学習コストが高すぎます。

一方で、PowerQueryはコードを一切書かなくても、複数のブックや複数のシートからデータを取り出し、列単位で計算や操作を行う事ができます。
その他にも項目別に集計を行うという「グループ化」という非常に高機能な計算機能があります。
また、PowerQueryで得た知識はSQLにも応用や転用ができます。

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?