Sumif-index-match

kredstone

New Member
Joined
Mar 23, 2018
Messages
2
Hello,

I'm trying to build a formula that sums up the YTD budget using an account and a date. I got the MTD budget using the following: =INDEX(A1:G4,MATCH(A7,A1:A4,0),MATCH(A6,A1:G1,0))

How do I sum the January through May amounts using 2 variables?






[TABLE="width: 500"]
<tbody>[TR]
[TD][/TD]
[TD][/TD]
[TD]1/31/18[/TD]
[TD]2/28/18[/TD]
[TD]3/31/18[/TD]
[TD]4/30/18[/TD]
[TD]5/31/18[/TD]
[/TR]
[TR]
[TD]505 - -*1111[/TD]
[TD]Account 1[/TD]
[TD]1935.40[/TD]
[TD]2391.30[/TD]
[TD]2666.16[/TD]
[TD]2809.15[/TD]
[TD]2813.04[/TD]
[/TR]
[TR]
[TD]505 - -*1212[/TD]
[TD]Account 2[/TD]
[TD]168.44[/TD]
[TD]168.44[/TD]
[TD]168.44[/TD]
[TD]168.44[/TD]
[TD]168.44[/TD]
[/TR]
[TR]
[TD]505 - -*1414[/TD]
[TD]Account 3[/TD]
[TD]222.90[/TD]
[TD]222.90[/TD]
[TD]222.90[/TD]
[TD]222.90[/TD]
[TD]222.90[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]5/31/18[/TD]
[TD]MTD Budget[/TD]
[TD]YTD Budget[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]505 - -*1111[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
Welcome to Mr Excel forum

Try
=SUMIF(C$1:G$1,"<="&A$6,INDEX(C$2:G$4,MATCH(A7,A$2:A$4,0),0))

Hope this helps

M.
 
Upvote 0

Forum statistics

Threads
1,225,747
Messages
6,186,792
Members
453,371
Latest member
HMX180

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