sumproduct and index match help

dmheller

Board Regular
Joined
May 26, 2017
Messages
116
So here is what I am looking to do
I have a column of dates then a calculated number 1 2 or 3
I have test data and results,
I want to calculate the total for the year with an equation but I need the test date to be the latest one so here, 2/10/18 uses 3 then 6/2/18 uses 8
Equation is like this but I need to index somewhere
=90/60/60*(SUMIFS($B:$B,$A:$A,"<"&$C$2)*(D2*0.22+9.6*0.78)+SUMIFS($B:$B,$A:$A,">"&$C$3)*(D3*0.22+9.6*0.78))
Can
anyone please help me so I can index this. The thing is for an entire year so there will be a cell somewhere that has 2018. Then I need the equation to work for all of column A for 2018 then I want the same equation to work for 2019 so I don't have to change any references. Please help if you can. Sorry the data is there 2 times, I coundt delete the 2nd set.
ABCD
datecalctestresult
2/10/2018 6:0016/8/20173
6/2/2018 18:0025/9/20188
12/31/2018 22:0007/12/20191
12/31/2018 23:000
1/1/2019 0:000
1/1/2019 1:001
<colgroup><col width="111" style="width: 83pt; mso-width-source: userset; mso-width-alt: 4059;"> <col width="64" style="width: 48pt;" span="3"> <col width="68" style="width: 51pt; mso-width-source: userset; mso-width-alt: 2486;"> <col width="64" style="width: 48pt;"> <tbody> </tbody>

datecalctestresult
2/10/2018 6:0016/8/20173
6/2/2018 18:0025/9/20188
12/31/2018 22:0007/12/20191
12/31/2018 23:000
1/1/2019 0:000
1/1/2019 1:001

<colgroup><col width="111" style="width: 83pt; mso-width-source: userset; mso-width-alt: 4059;"><colgroup><col width="64" style="width: 48pt;" span="3"><colgroup><col width="68" style="width: 51pt; mso-width-source: userset; mso-width-alt: 2486;"><colgroup><col width="64" style="width: 48pt;"><tbody>
</tbody>


 

Some videos you may like

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.

Watch MrExcel Video

Forum statistics

Threads
1,108,708
Messages
5,524,431
Members
409,577
Latest member
Dwg

This Week's Hot Topics

Top