エクセル|でマッチ関数を使う方法検索値範囲内の相対位置を返す
MATCH関数とは何ですか?
MATCH 関数は、列番号または行番号で指定した範囲内で検索する数値または文字列を返します。
MATCH 関数を使用すると、検索するテーブルの行数と列数を確認できます。
MATCH 関数の形式
まず、MATCH関数のフォーマットを確認してみましょう。
MATCH 関数は、指定された一致タイプに従って検査範囲を検索し、検索値に一致する配列内のエレメントの相対位置を表す数値を返します。
形式は “=MATCH(検索値、検索範囲、 [照合の種類]) MATCH 関数は、最大 3 つの引数を使用します。
※引数(ひきす)は、Excelの関数を利用する際に必要な情報です。結果を返すための意思決定材料としての関数を想像してみましょう。関数名の後に括弧 “() を付けて入力します。
このページを閲覧している方におすすめの商品
最初の引数 (検索値)
最初の引数は「検索値」です。この引数は必須です。検索する値またはセル参照。文字列などの値を指定する場合は、「文字列」のように二重引用符で囲みます。
検索値は、2番目の引数「検索範囲」から検索されます。
一致する 3 番目の引数が “0" の場合、チェック値は疑問符 (?) とアスタリスク (*) などのワイルドカード文字です。
2 番目の引数 (検索範囲)
2 番目の引数は “検索範囲" です。この引数は必須です。検索するセルの範囲を指定します。
3 番目の引数 (一致する型)
3 番目の引数は “照合順序の種類" です。この引数はオプションです。検索範囲から検査値を検索する方法として「-1」、「0」、「1」のいずれかを指定するか、省略した場合は「1」を指定します。
一致するタイプ | 検索値を見つける方法 |
---|---|
1 | 検査値より下の最大値を見つけます。2 番目の引数 “検索範囲" は昇順で並べ替える必要があります。 |
0 | 検査値と完全に一致する最初の値を見つけます。 |
-1 | 検査値より上の最小値を見つけます。2 番目の引数 “search range" は降順に並べ替える必要があります。 |
マッチ関数の使い方(練習)
実際に MATCH 関数を使用する例を次に示します。引数の使い方を見てみましょう。
作業時間:7分
テーブルを準備する
まず、上記の表を準備しましょう。ケーキが何列のケーキの上にあり、何行の売り上げがあるかを調べたいとしましょう。
マッチ機能を入力
まず、G2 セルを選択し、セルに直接「=MATCH(」と入力します。
検索値の指定
検索値として F2 セルを選択します。"=MATCH(F2,"" が G2 セルに入力されました。
検索範囲を指定する
A2 セルから A6 セルまでの範囲をまとめて選択します。"=MATCH(F2,A2:A6,"' が G2 セルに入力されました。
一致するタイプを指定する
マッチングの種類として、ここで完全一致の「0」を指定し、G2セルに「=MATCH (F2,A2:A6,0)」と入力して、[Enter].
マッチ関数の結果
検索値 (cake) の位置が “3" 行に表示され、G2 セルが指定した範囲 (A2:A6) に表示されました。
以上のように、「売上数」の位置を探してみましょう。G3 セルに「=MATCH (F3, B1: C1, 0)」と入力し、入る押す。
検索値の場所(売上数)が「2」列に表示され、G3セルが指定した範囲(B1:C1)に表示されました。
MATCH機能の応用
ワイルドカードであいまいに検索する方法
一致関数は、あいまいに検索することもできます。ワイルドカードを使用すると、前方、部分的、後方、およびその他の一致を検索できます。
幅広い一致検索
部分一致を検索するには、検索する文字列の前後に “*" を追加します。
上の図では、列 A から “Co" を含むセルの位置を見てみましょう。G4 セルを選択し、=MATCH (“*co*", A2:A6, 0) と入力します。
ほら文字列を含むパターンの場合、文字列の前後に “*" (アスタリスク) を付けます。
列Aに「co」が含まれていたのは4行目の「チョコレート」でした。正しい位置が G4 セルに表示されます。
前方一致検索
検索する文字列に「*」を追加することで、前方一致で検索できます。
上の図では、列 A から “Ku" で始まるセルの位置を見てみましょう。G5 セルを選択し、=MATCH (“Ku*", A2:A6, 0) と入力します。
文字列の後に「*」(アスタリスク)を入れて、文字列の先頭が「ku」になっているパターンを探します。
A列の「ku」で始まる「クッキー」の2行目でした。正しい位置が G5 セルに表示されます。
後方一致検索
検索する文字列の前に「*」を追加することで、後方一致で検索できます。
上の図では、列 A から “Ro" で終わるセルの位置を見てみましょう。G6 セルを選択し、=MATCH (“*ro", A2:A6, 0) と入力します。
文字列の前に「*」(アスタリスク)を入れて、文字列の末尾が「Ro」になっているパターンを探します。
A欄の「Ro」で終わるのは5行目の「マシュマロ」でした。正しい位置が G6 セルに表示されます。
任意の文字を検索する
「?」 ??? を使用して任意の 1 文字を検索できます。任意の 3 文字を検索できます。
上の図では、列 A から “Ma" で始まる 4 文字のセルの位置を見てみましょう。G7 セルを選択し、=MATCH (“???,A2:A6,0")と入力します。
文字列の後に “?"文字列の先頭が “Ma" で、任意の 3 文字が “あるパターンを見つける。
列 A の “Ma" で始まる 4 文字のセルは、最初の行の “macaroon" でした。正しい位置が G7 セルに表示されます。
複数の条件で検索する方法
MATCH 関数を使用して、複数の検索値に適合する場所を検索する方法について説明します。
上記のようなテーブルを使用します。この目的のために、F2 セルと G2 セルで条件 1 と 2 の両方を満たす行の数を調べたいとします。
まず、H2 セルを選択し、セルに直接「=MATCH(」と入力します。
検索値として F2 セルと G2 セルを選択します。H2 セルに “=MATCH(" の後に F2&g2″ と入力します。
私は “&"を使って2つのセルを結合しています。
A2 セルから A6 セル、および B2 セルから B6 セルの範囲を選択します。H2 セルに「=MATCH (F2&g2,"」) と入力し、その後に「A2:A6&B2:B6」と入力します。
私は “&"を使って2つのセル範囲を結合しています。
マッチングの種類として、ここで完全一致の “0" を指定し、"=MATCH (F2&G2, A2: A6 & B2:B6,", に続く H2 セルに “0) と入力します。入る押す。
複数の検索値 (条件 1 と 2) で複数の範囲 (A2:A6 と B2:B6) に一致する場所が “2" 行と H2 セルに表示されました。
MATCH 関数と INDEX 関数を組み合わせる
MATCH関数とINDEX関数を組み合わせてデータを抽出する方法を紹介します。マッチ関数はINDEX関数と組み合わされることが多いので、その方法を学びましょう。
#N/A エラーが発生した場合の対処方法
MATCH 関数を使用すると、「#N/A (割り当てなし)」エラーまたは意図しない結果が生じる可能性があります。"#N/A" Ellafunction 形式が異なる場合や、引数が正しく使用されていないことがよくあります。
MATCH関数の「#N/A」エラーの主な例を示しながら、その対処方法を説明しましょう。
検索値が検索範囲にない場合
MATCH 関数は、検索範囲から検索値を検索します。検索値が検索範囲内にない場合は、#N/A エラーが表示されます。
たとえば、上の表で、左側の表のケーキを含む行の位置をG2セルに表示するとします。
検索範囲が「B2:B6」で、「#N/A」というエラーが表示されました。「ケーキ」は指定された検索範囲に含まれていません。
上の図には cor があります検索範囲に含めるように検索値を修正しました。今回は、検索範囲として「A2:A6」を用いることで、検索値も適切に含まれています。
完全一致を指定しましたが、見つかりません
MATCH関数では、3番目の引数の「一致型」に「0」を指定すると完全一致が検索され、完全一致がなければ「#N/A」エラーが表示されます。
たとえば、上の表で、左側の表のゼリーを含む行の位置をG2セルに表示したいとします。
検索範囲に検索値がないため、「#N/A」エラーが表示されます。検索範囲に存在するものが検索値であるとします。
検索値を参照する列は昇順でソートされません。
MATCH 関数が 3 番目の引数 “Matching Type" に “1" を指定する場合、検索値を参照する列は昇順でソートする必要があります。検索値を参照する列が昇順でない場合、結果が正しくない可能性があります。
たとえば、上の表で、G4 セルの左側の表から近似値が 320 の行の位置を表示するとします。
上の画像では、C列が昇順でソートされていないため、「#N/A」エラーが表示されていました。
C 列を昇順に並べ替えることで、正しい結果を得ることができます。
エクセルのアドレス関数の使い方は|セル参照の文字列を検索する
エクセルのSELECT機能の使い方は|インデックス対応の値を取得する
エクセルのCOLUMN関数の使い方|指定したセルの列番号を見つけます
エクセル|でフィルタ関数を使用する方法必要なデータを抽出します
Excel の GETPIVOTDATA 関数の使い方 |ピボットテーブルデータ取得
エクセルでHLOOKUP関数を使用する方法|指定した行と同じ列の値を返します
Excel |でハイパーリンク関数を使用する方法ハイパーリンクを作成する
エクセルのINDEX関数の使い方は|行と列が交差するセルを返す
エクセルの間接関数の使い方は|セルやその他のシートを参照します
エクセルのルックアップ機能の使い方 |単一行または列の範囲から検索する
指定した位置にあるセルの範囲を参照|エクセルでオフセット関数を使用する方法
Excel で ROWS 関数を使用する方法|参照、または配列内の行数を返す
ディスカッション
コメント一覧
Friends, I looked at the comments and entered 2 hours later, mine came ??
ivermectin brand name ivermectin over the counter
Fantastic blog post.Really looking forward to read more. Want more.
Very informative blog post.Thanks Again. Great.
I value the blog article.Much thanks again. Really Great.
Major thankies for the blog article.Really thank you! Really Great.
Really informative article post.Much thanks again. Fantastic.
Thanks-a-mundo for the article post.Really looking forward to read more. Really Cool.
Fantastic blog.Really thank you! Keep writing.
I really liked your post.Really looking forward to read more. Want more.
A big thank you for your blog post.Really thank you! Really Cool.
Thanks so much for the blog post.Thanks Again. Cool.
Very good blog article.Thanks Again. Really Great.
apartments in boone nc the brady apartments aviata apartments
เกมส์สล็อตที่มีให้เล่นมากถึง 100 ชนิดเกมส์โอกาสมากมายในการได้รางวัลจากการทำแจ็คพอตแตกเกมคาสิโนมีกราฟิกที่สวยงามชวนให้เล่นน่าตื่นตาตื่นใจ
Itís hard to find educated people for this topic, however, you sound like you know what youíre talking about! Thanks
Looking forward to reading more. Great article post.Much thanks again. Really Cool.Loading…
Trực Tiếp đá Bóng Việt Nam Vs Lebanon. Coi Truc Tiep Bong Da. Futsal Việt Namxem vtv5Nếu cứ đùa như cách vừa tiêu diệt Everton tới 3-1 bên trên Sảnh khách
This is one awesome article post.Really thank you! Will read on…
Wow, great blog.Really thank you! Awesome.
Very informative blog.Really thank you! Great.
I am sure this post has touched all the internet viewers,its really really nice paragraph on buildingup new blog.
soolantra ivermectin cream 1 ivermectin for bird mites
Muchos Gracias for your post. Will read on…
Say, you got a nice blog.Much thanks again. Will read on…
A round of applause for your blog post.Really thank you! Really Cool.
Thanks so much for the article.Much thanks again. Really Cool.
stromectol ivermectin does ivermectin work
This is a great tip especially to those fresh to the blogosphere. Short but very accurate infoÖ Thanks for sharing this one. A must read post!
When some one searches for his necessary thing, therefore he/she needs to be available that in detail, thus that thing is maintained over here.
I really enjoy the article post.Really looking forward to read more. Really Cool.
the arches apartments apple creek apartments apartments in davis ca
Really enjoyed this blog article.Really thank you! Keep writing.
Really appreciate you sharing this blog.Thanks Again. Great.
Enjoyed every bit of your post.Thanks Again. Really Cool.
Great, thanks for sharing this blog article.Really thank you! Will read on…
dosage ivermectin for humans ivermectin cream uk Opmpfvvt ivermektin atd
I value the blog.Thanks Again. Awesome.
Exactly what a man of potential! You have the capacity to create great factors that you can’t get everywhere. to envy
Thank you ever so for you blog post.Really looking forward to read more. Awesome.
I appreciate you sharing this blog.Really looking forward to read more. Awesome.
smooth music
sleeping music
Hi there, everything is going sound here and ofcourse every one is sharing data, that’s in fact good, keep up writing.
jazz work coffee
Amazing issues here. I’m very happy to peer your post.Thanks so much and I’m taking a look forward to contact you.Will you kindly drop me a mail?
Thank you for any other fantastic post. The place else may just anyone get that typeof info in such an ideal means of writing? I’ve a presentation subsequent week, and I’m on the lookfor such information.
I truly appreciate this post. I’ve been looking everywhere for this! Thank goodness I found it on Bing. You’ve made my day! Thank you again
Very neat post.Really thank you! Really Cool.
What’s up colleagues, nice paragraph and good argumentscommented at this place, I am actually enjoying by these.
Really enjoyed this blog article. Will read on…
wow, awesome blog. Really Cool.
A big thank you for your post.Thanks Again. Keep writing.
Really enjoyed this blog article.Really looking forward to read more. Awesome.
This is one awesome article post.Really looking forward to read more. Will read on…
I truly appreciate this blog.Really thank you! Cool.
Great, thanks for sharing this article.Much thanks again. Keep writing.
Major thankies for the blog post.Really thank you! Keep writing.
I do not even know the way I ended up right here, however I believed this submit was good.I do not realize who you’re but certainly you’re going to a famous bloggerif you happen to are not already. Cheers!
Major thankies for the article post.Much thanks again. Much obliged.
Thanks a lot for the article.Much thanks again. Really Cool.
Im obliged for the article.Much thanks again. Will read on…
It’s difficult to find educated people for this topic, but you sound like you know what you’re talking about!Thanks
I appreciate you sharing this article.Much thanks again. Keep writing.
how to use tinder , tinder logintinder login
excellent points altogether, you just gained a new reader. What would you recommend about your post that you made a few days ago? Any positive?
I loved your blog article.Really thank you! Awesome.
Recorded Delivery venlafaxine half life No, he didnât get any help and by seasonâs end he was battered from all the physical play. But in those fourth-quarter failures he was far from the same player who earlier in the season was MVP-worthy.
play slots online online slot games online gambling
Appreciate you sharing, great blog article.Really thank you! Cool.
There is evidently a lot to identify about this. I feel you made various good points in features also.
replica rolex structure is really serious workable never ever crucial nice.
I am so grateful for your article.Much thanks again. Great.
Muchos Gracias for your blog.Much thanks again. Keep writing.
Very informative blog post.Much thanks again. Will read on…
A big thank you for your blog article.Really looking forward to read more. Fantastic.
Thank you for your post.Much thanks again. Much obliged.
Very good information. Lucky me I found your blog by accident(stumbleupon). I have saved as a favorite for later!Here is my blog post :: Hilda
An attention-grabbing dialogue is value comment. I feel that it is best to write extra on this matter, it may not be a taboo subject but typically individuals are not enough to talk on such topics. To the next. Cheers
Muchos Gracias for your blog post.Much thanks again. Awesome.
Im obliged for the post.Really looking forward to read more. Want more.
Very good blog post. Really Great.
Very informative article post.Much thanks again. Will read on…
I really like and appreciate your article.Much thanks again. Want more.
This is one awesome article.Much thanks again. Really Cool.
Muchos Gracias for your article post.
Thanks for sharing, this is a fantastic article.Really looking forward to read more. Cool.
Major thanks for the blog.Really looking forward to read more. Really Cool.
You could certainly see your expertise in the work you write. The world hopes for more passionate writers like you who are not afraid to say how they believe. Always go after your heart.
I love the efforts you have put in this, thank you for all the great posts.My blog – hodia gordonii
Dead written content material, thank you for entropy.
wow, awesome blog. Much obliged.
Thank you ever so for you blog.Much thanks again. Much obliged.
Just Browsing While I was surfing today I saw a great article about
I really like reading through an article that will make men andwomen think. Also, thanks for allowing me to comment!
Hello.This post was extremely remarkable, especially because I was looking for thoughts on this matter last week.
I am now not sure where you’re getting your info, however good topic.I must spend a while learning much more or understanding more.Thanks for excellent info I used to bee looking for this info for my mission.
best custom essay writing services custom essay writing service reviews writing essay services
Great blog.Really looking forward to read more. Awesome.
I want to to thank you for this good read!! I definitely loved every bit of it.I have you bookmarked to check out new stuff you post…
Appreciate you sharing, great blog post.Thanks Again. Want more.
Insert your card prodroxatone free trial “I will vote for Aliyev because he has done a lot for our country… I don’t want Azerbaijan to return to chaos and I don’t trust the opposition at all,” said Sabina Guluzade, 52, a schoolteacher in Baku.
Major thanks for the article.Really looking forward to read more. Much obliged.
I will right away take hold of your rss feed as I can’t in findingyour email subscription hyperlink or newsletter service. Do you’ve any?Kindly permit me recognise in order that I may subscribe.Thanks.
online medications from india: trusted india online pharmacies online medications from india
Thank you for your article post.Much thanks again. Will read on…
Very interesting points you have observed, thanks for posting.
meloxicam dose for chickens meloxicam warnings meloxicam side effects memorymeloxicam for cats oral mobic disc generic for mobic medication
wow, awesome post.Much thanks again. Really Cool.
Fantastic blog post. Awesome.
Great, thanks for sharing this blog post.Much thanks again. Great.
Im grateful for the blog post.Really thank you!
You are my inhalation, I possess few blogs and occasionally run out from to brand.
Awesome article post.Thanks Again. Fantastic.
I am continuously searching online for articles that can aid me. Thank you!
I truly appreciate this blog article. Keep writing.
I am so grateful for your post.Thanks Again.
Im grateful for the blog article.Really looking forward to read more. Want more.
Awesome blog article. Fantastic.
Awesome blog. Will read on…
Really informative blog article.Really thank you! Much obliged.
Nicely put, Appreciate it. great college admission essays research dissertation psychology dissertation topics
Thanks for the post.Really thank you! Keep writing.
Thanks for sharing, this is a fantastic blog post.Really thank you! Really Cool.
I quite like reading through a post that can make people think.Also, thanks for permitting me to comment!Feel free to visit my blog: daftar slot carslot88
I will right away grab your rss as I can not in finding your e-mail subscription hyperlink or e-newsletterservice. Do you’ve any? Kindly permit me recognize in order that I may just subscribe.Thanks.
Thank you for your post.Really looking forward to read more. Awesome.
Im grateful for the blog article.Thanks Again.
Im thankful for the post.Really looking forward to read more. Keep writing.
Thanks so much for the blog article. Great.
Your style is really unique in comparison to other folks I have read stuff from. I appreciate you for posting when you’ve got the opportunity, Guess I will just book mark this blog.
That is a great tip particularly to those new to the blogosphere.Brief but very precise information… Thanks for sharing this one.A must read article!
WOW just what I was looking for. Came here by searchingfor 우리카지노 더킹
Thanks for sharing, this is a fantastic article post.Much thanks again. Will read on…
Thanks again for the post.Thanks Again. Want more.
I am so grateful for your article post.Really thank you!
Very good blog post.Really thank you!
The most talked about weight loss product is finally here! FitSpresso is a powerful supplement that supports healthy weight loss the natural way. Clinically studied ingredients work synergistically to support healthy fat burning, increase metabolism and maintain long lasting weight loss. https://fitspresso-try.com/
ピンバック & トラックバック一覧
… [Trackback]
[…] Read More Information here on that Topic: office-blog.jp/archives/2964 […]
… [Trackback]
[…] Find More on that Topic: office-blog.jp/archives/2964 […]