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?

More than 1 year has passed since last update.

【Excelアドイン】フィルターにセル参照を設定してみる

Last updated at Posted at 2022-02-25

クエリへフィルターを追加する

テーブル数式が設定されているアンカーセルをダブルクリックします。
お馴染みの「クエリビルダ」が起動します。
Qiita 2022-02-25 Figure 1.png
”選択”階層領域から”売上日”フィールドを、ドラッグ&ドロップで”フィルター”領域に設定します。
Qiita 2022-02-25 Figure 2.png

フィルターにセル参照を設定する

セル$\color{Blue}{\rm B2}$に”売上日”と入力します。
”売上日”フィルターの値フィールド(From:左側)を選択した状態で、Excelワークシートのセル$\color{Blue}{\rm C2}$をダブルクリックして、セル参照を転送します。
同じように”売上日”フィルターの値フィールド(To:右側)に、セル$\color{Blue}{\rm D2}$のセル参照を転送します。
OKボタンを押して、クエリビルダを終了します。
Qiita 2022-02-25 Figure 3.png
では、セル$\color{Blue}{\rm C2}$をダブルクリックしてみます。先ほど設定したセル参照により、定義したクエリとのリンクが存在しているので、日付オプションダイアログが表示されます。もちろん直接セル$\color{Blue}{\rm C2}$や$\color{Blue}{\rm D2}$に日付を入力してもかまいません。
Qiita 2022-02-25 Figure 4.png
このようにしてセル$\color{Blue}{\rm C2}$および$\color{Blue}{\rm D2}$のフィルター値を変更すると、直ちに再計算が行われテーブルが更新されます。
試してみてください。
Qiita 2022-02-25 Figure 5.png

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?