メインコンテンツへスキップ

Excelで行または列の一致をvlookupして合計する方法は?

vlookupとsum関数を使用すると、指定された基準をすばやく見つけて、対応する値を同時に合計するのに役立ちます。 この記事では、Excelの行または列で最初またはすべての一致した値をvlookupして合計するXNUMXつの方法を紹介します。

数式を使用したXNUMX行または複数行のVlookupと合計の一致
数式を含む列のVlookupと合計の一致
すばらしいツールを使用して、行または列のvlookupと合計の一致を簡単に確認できます

VLOOKUPのその他のチュートリアル...


数式を使用したXNUMX行または複数行のVlookupと合計の一致

このセクションの数式は、Excelの特定の基準に基づいて、XNUMX行または複数行の最初またはすべての一致した値を合計するのに役立ちます。 次のようにしてください。

Vlookupを実行し、行で最初に一致した値を合計します

以下のスクリーンショットに示すようなフルーツテーブルがあり、テーブル内の最初のAppleを検索してから、同じ行の対応するすべての値を合計する必要があるとします。 これを実現するには、次のようにしてください。

1.空白のセルを選択して結果を出力します。ここでは、セルB10を選択します。 以下の式をコピーして、 Ctrlキー + シフト + 入力します 結果を得るためのキー。

=SUM(VLOOKUP(A10, $A$2:$F$7, {2,3,4,5,6}, FALSE))

注意:

  • A10 探している値を含むセルです。
  • $ A $ 2:$ F $ 7 ルックアップ値と一致した値を含むデータテーブル範囲(ヘッダーなし)です。
  • 2,3,4,5,6 {} 結果値の列がテーブルの6番目の列で始まり、2,3,4,5,6番目の列で終わることを表します。 結果の列数が2,3,4,5,6,7,8,9を超える場合は、{XNUMX}を{XNUMX…。}に変更してください。
Vlookupを実行し、一致したすべての値を複数の行で合計します

上記の式は、最初に一致した値の行の値のみを合計できます。 複数の行のすべての一致の合計を返したい場合は、次のようにしてください。

1.空白のセルを選択し(この場合はセルB10を選択します)、以下の数式をコピーして、 入力します 結果を得るための鍵。

=SUMPRODUCT((A2:A7=A10)*B2:F7)

Excelの行または列でのvlookupと合計の一致を簡単に:

  ルックアップと合計 の有用性 Kutools for Excel 以下のデモに示すように、Excelの行または列の一致をすばやくvlookupして合計するのに役立ちます。
今すぐKutoolsfor Excelの全機能を30日間無料でダウンロードしてください!


数式を含む列のVlookupと合計一致値

このセクションでは、特定の基準に基づいてExcelの列の合計を返す数式を提供します。 以下のスクリーンショットに示すように、フルーツテーブルで列タイトル「Jan」を探してから、列全体の値を合計します。 次のようにしてください。

1.空白のセルを選択し、以下の数式をコピーして、 入力します 結果を得るための鍵。

=SUM(INDEX(B2:F7,0,MATCH(A10,B1:F1,0)))


すばらしいツールを使用して、行または列のvlookupと合計の一致を簡単に確認できます

数式の適用が苦手な場合は、ここでお勧めします VlookupとSum の特徴 Kutools for Excel。 この機能を使用すると、クリックするだけで、行または列の一致を簡単にvlookupして合計できます。

申請する前に Kutools for Excelについては 最初にダウンロードしてインストールします.

XNUMX行または複数行の最初またはすべての一致した値をVlookupして合計します

1。 クリック クツール > スーパールックアップ > ルックアップと合計 機能を有効にします。 スクリーンショットを参照してください:

2。 の中に ルックアップと合計 ダイアログボックスで、次のように構成してください。

  • 2.1) ルックアップと合計タイプ セクションで、 行内の一致した値を検索して合計します オプション;
  • 2.2) ルックアップ値 ボックスで、探している値を含むセルを選択します。
  • 2.3) 出力範囲 ボックスで、結果を出力するセルを選択します。
  • 2.4) データテーブルの範囲 ボックスで、列ヘッダーのないテーブル範囲を選択します。
  • 2.5) オプション セクションで、最初に一致した値のみを合計する場合は、 最初に一致した値の合計を返します オプション。 すべての一致の値を合計する場合は、 すべての一致値の合計を返します オプション;
  • 2.6)をクリックします OK ボタンをクリックすると、すぐに結果が得られます。 スクリーンショットを参照してください:

Note:XNUMXつまたは複数の列で最初またはすべての一致した値をvlookupして合計する場合は、 列内の一致した値を検索して合計します ダイアログボックスのオプションを選択し、以下のスクリーンショットのように構成します。

この機能の詳細については、 ここをクリックしてください.

  このユーティリティの無料トライアル(30日)が必要な場合は、 クリックしてダウンロードしてください、次に、上記の手順に従って操作を適用します。


関連記事

複数のワークシートにわたるVlookup値
vlookup関数を適用して、ワークシートのテーブルに一致する値を返すことができます。 ただし、複数のワークシート間で値をvlookupする必要がある場合は、どうすればよいでしょうか。 この記事では、問題を簡単に解決するための詳細な手順について説明します。

Vlookupを実行し、一致した値を複数の列に返します
通常、Vlookup関数を適用すると、一致した値をXNUMXつの列からのみ返すことができます。 場合によっては、基準に基づいて複数の列から一致する値を抽出する必要があります。 これがあなたのための解決策です。

XNUMXつのセルに複数の値を返すVlookup
通常、VLOOKUP関数を適用するときに、基準に一致する値が複数ある場合は、最初の値の結果しか取得できません。 一致したすべての結果を返し、それらをすべてXNUMXつのセルに表示したい場合、どのように達成できますか?

Vlookupを実行し、一致した値の行全体を返します
通常、vlookup関数を使用すると、同じ行の特定の列からのみ結果を返すことができます。 この記事では、特定の基準に基づいてデータの行全体を返す方法を説明します。

逆方向のVlookupまたは逆の順序
一般に、VLOOKUP関数は配列テーブルの左から右に値を検索し、ルックアップ値がターゲット値の左側にある必要があります。 ただし、ターゲット値がわかっていて、逆にルックアップ値を見つけたい場合があります。 したがって、Excelで逆方向にvlookupする必要があります。 この記事には、この問題に簡単に対処する方法がいくつかあります。

VLOOKUPのその他のチュートリアル...

最高のオフィス生産性向上ツール

🤖 Kutools AI アシスタント: 以下に基づいてデータ分析に革命をもたらします。 インテリジェントな実行   |  コードを生成  |  カスタム数式の作成  |  データを分析してグラフを生成する  |  Kutools関数を呼び出す...
人気の機能: 重複を検索、強調表示、または識別する   |  空白行を削除する   |  データを失わずに列またはセルを結合する   |   数式なしのラウンド ...
スーパールックアップ: 複数の基準の VLookup    複数の値の VLookup  |   複数のシートにわたる VLookup   |   ファジールックアップ ....
詳細ドロップダウン リスト: ドロップダウンリストを素早く作成する   |  依存関係のドロップダウン リスト   |  複数選択のドロップダウンリスト ....
列マネージャー: 特定の数の列を追加する  |  列の移動  |  Toggle 非表示列の表示ステータス  |  範囲と列の比較 ...
注目の機能: グリッドフォーカス   |  デザインビュー   |   ビッグフォーミュラバー    ワークブックとシートマネージャー   |  リソースライブラリ (自動テキスト)   |  日付ピッカー   |  ワークシートを組み合わせる   |  セルの暗号化/復号化    リストごとにメールを送信する   |  スーパーフィルター   |   特殊フィルター (太字/斜体/取り消し線をフィルター...) ...
上位 15 のツールセット12 テキスト ツール (テキストを追加, 文字を削除する、...)   |   50+ チャート 種類 (ガントチャート、...)   |   40+ 実用的 (誕生日に基づいて年齢を計算する、...)   |   19 挿入 ツール (QRコードを挿入, パスから画像を挿入、...)   |   12 変換 ツール (数字から言葉へ, 通貨の換算、...)   |   7 マージ&スプリット ツール (高度な結合行, 分割セル、...)   |   ... もっと

Kutools for Excel で Excel スキルを強化し、これまでにない効率を体験してください。 Kutools for Excelは、生産性を向上させ、時間を節約するための300以上の高度な機能を提供します。  最も必要な機能を入手するにはここをクリックしてください...

説明


Officeタブは、タブ付きのインターフェイスをOfficeにもたらし、作​​業をはるかに簡単にします

  • Word、Excel、PowerPointでタブ付きの編集と読み取りを有効にする、パブリッシャー、アクセス、Visioおよびプロジェクト。
  • 新しいウィンドウではなく、同じウィンドウの新しいタブで複数のドキュメントを開いて作成します。
  • 生産性を 50% 向上させ、毎日何百回もマウス クリックを減らすことができます!
Comments (26)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
I need help with a formula. I have 2 sheets to pull data from and calculate the sum of on column with a match to a name.
I.e Name is in sheet 1 D5, the name in sheet 2 is B3 the amounts to calculate which match the name in B3 in sheet 2 is F3 to F32.
I've tried sum index, vlookup, match and so on but keep getting a 0. Can anyone assist with this?
This comment was minimized by the moderator on the site
Hi Marnel Strydom,
I don't know if I understand you correctly: If the name in D5 of Sheet1 matches the name in B3 of Sheet2, then sum numbers in the range F3:F32 of Sheet2.
If so, you can apply the following formula to get it done.
=SUM(INDEX(Sheet2!F3:F32,0,MATCH(Sheet1!D5,Sheet2!B3,0)))
This comment was minimized by the moderator on the site
I have a multi sheet spread sheet keeping track of job hours. I have used VLOOKUP in succession to sum all the hours on multiple sheets and it works great... Until it gets to a sheet that does not contain the lookup value. I have searched all over for my issue, and VLOOKUP may be the incorrect solution. I was wondering if I could rattle anyone's brain to make this work.

I.E. I have 1 excel document with 52 tabs. Each tab is a work week starting from January so WW1 is all the hours FOR sed jobs I did for that week. "joes house 2 hours ; mikes house 3 hours"... WW2, WW3 etc... Until WW52.

This is the function I made to add hours together...

=SUM(VLOOKUP(O30,'WW29'!$A$7:$M$110,{13},FALSE),VLOOKUP(O30,'WW30'!$A$7:$M$110,{13},FALSE),VLOOKUP(O30,'WW31'!$A$7:$M$110,{13},FALSE)) And it works great. But when that job is finished it is not on (for example WW32 tab). Hence I get the #N/A error. so for example, as the previous one works great when I expand the formula to cover all 52 sheets... (EXAMPLE OF NEXT PAGE WIOTHOUT LOOKUP VALUE)

=SUM(VLOOKUP(O30,'WW29'!$A$7:$M$110,{13},FALSE),VLOOKUP(O30,'WW30'!$A$7:$M$110,{13},FALSE),VLOOKUP(O30,'WW31'!$A$7:$M$110,{13},FALSE),VLOOKUP(O30,'WW32'!$A$7:$M$110,{13},FALSE)) I get the #N/A error because the job is not listed on WW32. But I may add hours to that on WW45.

Is there a way to make VLOOKUP skip a sheet that does not have the referenced value and continue summing it till the end? I apologize, this may be as clear as mud but I will clarify anything if need be.

I have also tried IFERROR. You can set IFERROR to return text or even blanks, but does not seem to cover summing. I'm looking for how to SUM multiple sheets when some of the sheets do not contain the lookup value. When using IFERROR function, instead of RETURNING #N/A it just returns "YOU'VE ENTERERED TOO MANY ARGUMENTS FOR THIS FUNCTION"...

=IFERROR(VLOOKUP(O30,'WW29'!$A$7:$M$110,{13},FALSE),VLOOKUP(O30,'WW30'!$A$7:$M$110,{13},FALSE),VLOOKUP(O30,'WW31'!$A$7:$M$110,{13},FALSE),VLOOKUP(O30,'WW32'!$A$7:$M$110,{13},FALSE),"")

And that's just 3 sheets.

Any help would be greatly appreciated.

P.S. I have tried with CTRL+SHIFT+ENTER as well to no avail.
This comment was minimized by the moderator on the site
Hi Joe,
The methods provided in the following article can do you a favor. Please give it a try. Hope I can help.
How To Vlookup Across Multiple Sheets And Sum Results In Excel?
This comment was minimized by the moderator on the site
A B C D E F
1 I want this cells in col B to sum the values in col F7 (today) to say F20. this will reduce as tomorrow it will sum the values from F8:F20 and so on -$19 I
want this cells in column B to sum the values in col F7 (today) to say F10.
this will reduce as tomorrow it will sum the values from F8:F10 and so on

2 Fri 22 Jul 22 -$19
3 Sat 23 Jul 22 -$19
4 Sun 24 Jul 22 -$19
5 Mon 25 Jul 22 -$19
6 Tue 26 Jul 22 -$19
7 Wed 27 Jul 22 -$19 tried with vlookup, needless to say it doesn't work
8 Thu 28 Jul 22 -$19 =L8=(D1-E1)+SUM(vlookup(today(),6,false):F28)
9 Fri 29 Jul 22 -$19
10 Sat 30 Jul 22 -$19
11 Sun 31 Jul 22 -$19
12 Mon 01 Aug 22 -$19
13 Tue 02 Aug 22 -$19
14 Wed 03 Aug 22 -$19
15 Thu 04 Aug 22 -$19
This comment was minimized by the moderator on the site
hi
How can I add multiple vlookups together and sum it up ?


=VLOOKUP(E3,'Waste Process NEW'!N:O,2,FALSE) --------------- for this everything goes fine except that retune valve is only the first one where N column have many values match's lookup values of E3.


using index didn't help and shows #N/A
=SUM(INDEX('Waste Process NEW'!N:N,0,MATCH('Monthly Report'!H5,'Waste Process NEW'!1:1048576,0)))
This comment was minimized by the moderator on the site
Hi tariq,
Would you mind providing a screenshot of your data? Sorry for the inconvenience.
This comment was minimized by the moderator on the site
I just get a #VALUE! when I try to do all matched values, but it works for the first value. Any idea?
This comment was minimized by the moderator on the site
How can I add multiple vlookups together, for example I want to look up from your example Apples + oranges + bananas for January.Is there a way to do this?
This comment was minimized by the moderator on the site
I'm having trouble with a similar formula I feel like I need to use an index but can't figure it out. I'm trying to get the sum but the lookup is based on 2 values. Column D which contains an employee's extension and column I which provides a logout code. The goal is to find the sum of time in column K based on a specific employee (column D) and the logout code (column I).
This comment was minimized by the moderator on the site
Hi Mike,
Do you mind uploading a screenshot of your data?
This comment was minimized by the moderator on the site
Thanks but I was able to get my formula up and running with a sumifs calculation. Sumifs giving the sum of something based on multiple factors. Mine being an employee ID number and a status code.
This comment was minimized by the moderator on the site
what will be the formula to add qty of apple in jan only
This comment was minimized by the moderator on the site
the =SUM(PRODUCT((A2:A7=A11)*B2:I7) is not working with decimal point.
This comment was minimized by the moderator on the site
For me works just fine. Try without separating SUM and Product, it should be =SUMPRODUCT((A2:A7=A11)*B2:I7)
This comment was minimized by the moderator on the site
can one sum things up in a column and not a row?
This comment was minimized by the moderator on the site
Hi Jelly,
This formula =SUM(INDEX(B2:F9,0,MATCH(A12,B1:F1,0))) can help you solve the problem. Please have a try. Hope I can help.
There are no comments posted here yet
Load More
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations