SUMIFS with INDEX and MATCH

lewis_blackburn

New Member
Joined
Jul 31, 2008
Messages
11
Could someone please help me piece together the correct formula to sum up values in a cell range that meet my criteria? Consider the following range...

<TABLE><TBODY><TR><TD></TD><TD>Jan</TD><TD>Feb</TD><TD>Mar</TD></TR><TR><TD>VTSMX</TD><TD>100</TD><TD>300</TD><TD>200</TD></TR><TR><TD>VISVX</TD><TD>110</TD><TD>330</TD><TD>220</TD></TR><TR><TD>VBMFX</TD><TD>140</TD><TD>360</TD><TD>250</TD></TR></TBODY></TABLE>

...and assume that there is a named range called "UsStockFunds" that contains "VTSMX" and "VISVX". What I want to do it sum up all values in the range for January where the fund name is in the "UsStockFunds" named range. Here is my first attempt at the formula...

=SUMPRODUCT(SUMIFS(B2:D4, B1:D1, "Jan", A2:A4, UsStockFunds))

...which obviously didn't work. Can anyone figure out the correct formula to sum these values? The correct sum is 210.

Thanks!
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
Hi

Try:

=SUM(IF(B1:D1="Jan",IF(ISNUMBER(MATCH(A2:A4,UsStockFunds,0)),B2:D4)))

This is an array formula, you have to confirm it with CTRL-SHIFT-ENTER
 
Upvote 0
This worked for me...

Code:
=SUM(INDEX(B2:D4,MATCH("VTSMX",$A2:$A4,0),MATCH("Jan",$B$1:$D$1,0)))+SUM(INDEX(B2:D4,MATCH("VISVX",$A2:$A4,0),MATCH("Jan",$B$1:$D$1,0)))
 
Upvote 0

Forum statistics

Threads
1,224,526
Messages
6,179,322
Members
452,906
Latest member
Belthazar

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