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
in Column G, Quality can not be duplicated, its a unique Name
The Data entry and report Table is here
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
I have got this Table of Data Entered One Time
G | H | I | |
1 | Quality Name | Warp | Weft |
2 | Stpl.1 | 150 | 20 |
3 | Cotton.1 | 80 | 60 |
4 | Stpl.2 | 20 | 20 |
5 | Cotton.2 | 60 | 105 |
6 | Stpl.3 | 20 | 40 |
in Column G, Quality can not be duplicated, its a unique Name
The Data entry and report Table is here
A | B | C | D | E | F | |
1 | Yarn Name | Sent Bags | Remaining Stock | Used in Quality | Used as Warp | Used as Weft |
2 | 20 | 800 | 600 | Stpl.1 | 200 | |
3 | Stpl.2 | 70 | 30 | |||
4 | 40 | 300 | 290 | Stpl.3 | 100 | 10 |
5 | 20 | 400 |
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