4
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?

More than 3 years have passed since last update.

スピル機能はExcelを快適にできるのか

Posted at

はじめに

2019年にOffice365のExcelに実装された、スピル機能。
最近ようやく使い方を覚え、かなり便利に・快適になりました。

関数の記述量が圧倒的に少なくなり、これってかなり軽く・早くなるんじゃないの?
と思い、実査に調べてみようと思い立った次第です。

準備

以下の関数をExcelに仕込みます。
image.png
A列 → RAND()
B列 → A列 × RAND()
C列 → A列 × B列
D列 → B列 × C列

これを、オートフィルでExcelの最大1048576行まで指定します。

次に同じ計算をSPILLを使用して再現します。
image.png
A列 → RAND() -変わらず
B列 → A列 × RAND() -A列をスピルで参照
C列 → A列 × B列 - A列、B列をスピルで参照
D列 → B列 × C列 - B列、C列をスピル範囲演算子で参照

この2種類のExcelブックを比較します。

比較① ファイル容量

スピル無し

→84.3MB
image.png

スピル有り

→68.9MB
image.png

比較② ファイルを開く速さ

前提

いずれのファイルも、計算方法の設定を「手動」としています。
手元のiphoneでアナログに計測。

計測結果

スピル設定 1回目 2回目 3回目
なし 11.74 11.45 11.47
あり 9.49 9.77 9.95

比較③ 関数の再計算のスピード

準備

以下のように各Excelブックにマクロを仕込んで、自動計算前後の時刻の差分を取得します。

  Dim startTime As Double
  Dim endTime As Double
  Dim processTime As Double

  '開始時間取得
  startTime = Timer

  '再計算実施
    Calculate

  '終了時間取得
  endTime = Timer
  
   
   '処理時間表示
  processTime = endTime - startTime
  MsgBox "処理時間:" & processTime

計測結果

スピル設定 1回目 2回目 3回目
なし 0.628 0.548 0.617
あり 0.562 0.484 0.511

まとめ

いずれも、スピルありのほうが良い結果となりましたが、
個人的には、思っていたほどではないかな?という印象でした。

便利な機能であることは間違いないので、積極的に使っていきましょう。

4
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
4
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?