SumIfs with Index Match

montanaaggie

Board Regular
Joined
Nov 11, 2005
Messages
124
Office Version
  1. 365
Platform
  1. Windows
I can make my formula work (B16) with SUMIFS, but because the columns may change in time (Labor in column C, could someday be in column E), I would prefer to grab a whole table instead of a single column. As you can see in the formula in Row 16 I want to sum when a there's a "YES" (COLUMN E could move someday too) and it matches the Well Name (Won't move) and Cost Category (Won't move).

1729719644299.png
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
If you set the data up as a table, then the column references will stick even if they are rearranged.

Book1
ABCDE
1Well NameDateLaborWaterYes/No
2Well 150050Yes
3Well 170060Yes
4Well 130070Yes
5Well 1800100No
6Well 110015Yes
7Well 2565Yes
8Well 2775No
9Well 2385No
10Well 28115Yes
11Well 2130Yes
12
13
14
15LaborWater
16Well 11600195
17Well 214210
Sheet1
Cell Formulas
RangeFormula
D7:D11D7=D2+15
B16:B17B16=SUMIFS(Table1[Labor],Table1[Well Name],$A16,Table1[Yes/No],"Yes")
C16:C17C16=SUMIFS(Table1[Water],Table1[Well Name],$A16,Table1[Yes/No],"Yes")
 
Upvote 0
Book1
ABCDE
1Well NameDateLaborWaterYes/No
2Well 150050Yes
3Well 170060Yes
4Well 130070Yes
5Well 1800100No
6Well 110015Yes
7Well 2565Yes
8Well 2775No
9Well 2385No
10Well 28115Yes
11Well 2130Yes
12
13
14
15LaborWater
16Well 11600195  
17Well 214210  
Sheet1
Cell Formulas
RangeFormula
D7:D11D7=D2+15
B16:E17B16=IF($A16<>"",IFERROR(SUMIFS(INDEX($C$2:$E$11,,MATCH(B$15,$C$1:$E$1,0)),$A$2:$A$11,$A16,$E$2:$E$11,"yes"),""),"")




copy across and down
 
Upvote 0
Solution

Forum statistics

Threads
1,223,887
Messages
6,175,199
Members
452,617
Latest member
Narendra Babu D

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