Sumif of multiple Index matches against one value

mianmithu

New Member
Joined
Jan 13, 2020
Messages
24
Office Version
  1. 365
  2. 2010
  3. 2007
Platform
  1. Windows
Need help regarding Excel dynamically search based sum of two columns matching from two different tables.

I have got this Table of Data Entered One Time
GHI
1Quality NameWarpWeft
2Stpl.115020
3Cotton.18060
4Stpl.22020
5Cotton.260105
6Stpl.32040


in Column G, Quality can not be duplicated, its a unique Name

The Data entry and report Table is here
ABCDEF
1Yarn NameSent BagsRemaining StockUsed in QualityUsed as WarpUsed as Weft
220800600Stpl.1200
3Stpl.27030
440300290Stpl.310010
520400

C is Returning Column, Values are calculated on the base of Column A (Yarn Name) Need to Find Yarn Name (eg : "20" in H:H AND/OR I:I, wherever it matches, index that Quality from G Column, Then match the returned qualities(could be more than one) to D Column and sum the mathced results from E : F

I have tried so far in C5

=SUMIF($A$2:$A5,A5,$B$2:$B5)-(SUMIF($D$2:$D5,INDEX($G:$G,MATCH(A5,$H:$H,0)),$D$2:$D5)+SUMIF($D$2:$D5,INDEX($G:$G,MATCH(A5,$I:$I,0)),$D$2:$D5))

PS:- I am using Excel 2007
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.

Forum statistics

Threads
1,213,494
Messages
6,113,981
Members
448,538
Latest member
alex78

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top