0
1

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.

BizRobo!_Excelのセル値を検索し、値を取得する(名前付き範囲設定)

Last updated at Posted at 2022-06-22

###処理概要###
今回、商品マスタ(下記の図)から商品コードを検索し、単価を取得する
image.png

###設定方法###
image.png
割愛しております。

①「カレントウィンドウの設定」
 →ウィンドウビューに商品マスタが表示されるように設定します。

②「トライステップ」
 →後続の③「名前付き範囲選択」でExcel内に検索したい値が存在しなかった際に
 「名前付き範囲選択」がエラーとなるため「トライステップ」を設定します。

③「名前付き範囲選択」
 →Excelのセル値を検索するように設定します。
 
 ・アクションタブ
  範囲名を分かりやすくするために「自動」から「名前付き」に変更し、「商品情報」という名前を付けています。
  image.png

 ・エラー処理タブ
  ②の「トライステップ」に処理が遷移するようにThenを「次の代替手段を試行」、
  次のステップを「(直近のトライステップ)」に変更します。
  image.png

 ・ファインダータブ
  値を検索する範囲、使用を「一致するセル」、セルパターンを「検索したい値が格納されている変数」を設定します。
  image.png

 ・値が検索できた状態
  image.png

④「セル値抽出」
 →③で検索できた行の単価を取得できるように設定します。
  image.png
 
 設定された内容の確認
 ・アクションタブ
  image.png

 ・ファインダータブ
  範囲が上記③で設定した「商品情報」の場所から列がオフセット2(商品コードの列から右へ2列)が設定されています。
 image.png

⑤エラー処理
 →③の「名前付き範囲選択」でエラーになった際の処理を設定します。
 例では「変数の割当」でエラーフラグを設定してます。

###まとめ###
「名前付き範囲選択」を使用すると特定セルを基準に値を取得することができるので、
覚える必要があるステップだと感じました。

0
1
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
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?