Here's an example of some data below. I'm taking into account "MTD" and the date of Feb-18 (bold below) to sum values based on a text value ("Available Rooms" in this case). This would sum only for the month of February. Using the formula below I was hoping just to return 4,789 which is the second value of "Available Rooms" found for February. However, this adds up both values for February returning 8,037.
=IF($A$3="MTD",SUMPRODUCT(($A$6:$A$9=A13)*(MONTH($B$4:$M$4)=MONTH($A$2))*(YEAR($B$4:$M$4)=YEAR($A$2))*($B$6:$M$9)),INDEX($B$6:$M$9,SMALL(IF($A$6:$A$9=B13,ROW($A$6:$A$9)-ROW($A$6)+1),2),MATCH(A2,$B$4:$M$4)))
[TABLE="width: 913"]
<tbody>[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Feb-18[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]MTD[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]JAN
2018[/TD]
[TD]FEB
2018[/TD]
[TD] MAR 2018[/TD]
[TD]APR
2018[/TD]
[TD]MAY 2018[/TD]
[TD]JUN
2018[/TD]
[TD]JUL
2018[/TD]
[TD]AUG 2018[/TD]
[TD]SEP
2018[/TD]
[TD]OCT 2018[/TD]
[TD]NOV 2018[/TD]
[TD]DEC 2018[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Available Rooms[/TD]
[TD]3,596[/TD]
[TD]3,248[/TD]
[TD]3,596[/TD]
[TD]3,480[/TD]
[TD]3,596[/TD]
[TD]3,480[/TD]
[TD]3,596[/TD]
[TD]3,596[/TD]
[TD]3,480[/TD]
[TD]3,596[/TD]
[TD]3,480[/TD]
[TD]3,596[/TD]
[/TR]
[TR]
[TD]Occupied Rooms[/TD]
[TD]2,460[/TD]
[TD]2,344[/TD]
[TD]3,262[/TD]
[TD]2,982[/TD]
[TD]3,288[/TD]
[TD]3,205[/TD]
[TD]3,363[/TD]
[TD]3,295[/TD]
[TD]3,076[/TD]
[TD]3,126[/TD]
[TD]2,524[/TD]
[TD]2,502[/TD]
[/TR]
[TR]
[TD]Occupancy[/TD]
[TD="align: right"]68.4%[/TD]
[TD="align: right"]70.2%[/TD]
[TD="align: right"]90.2%[/TD]
[TD="align: right"]89.2%[/TD]
[TD="align: right"]89.6%[/TD]
[TD="align: right"]93.1%[/TD]
[TD="align: right"]96.0%[/TD]
[TD="align: right"]94.8%[/TD]
[TD="align: right"]89.8%[/TD]
[TD="align: right"]87.8%[/TD]
[TD="align: right"]0.0%[/TD]
[TD="align: right"]0.0%[/TD]
[/TR]
[TR]
[TD]Available Rooms[/TD]
[TD]2,555[/TD]
[TD]4,789[/TD]
[TD]2,222[/TD]
[TD]1,111[/TD]
[TD]3,125[/TD]
[TD]3,480[/TD]
[TD]3,596[/TD]
[TD]3,596[/TD]
[TD]3,480[/TD]
[TD]3,596[/TD]
[TD]3,480[/TD]
[TD]3,596[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/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]
[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]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Available Rooms[/TD]
[TD="align: right"]8,037[/TD]
[TD="align: right"]8,037[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
^---Formulas found here---^