I need a formula that can be used with a sumifs statement that can match one date from one list to the closest date on another.
For example, trade date was Dec 5th, I need this to be matched with the date labeled Dec 1st.
The problem I am having is that I am having trouble entering the criteria cell within my sumifs statement to find the closest date.
I was using the formula below embedded in my sumifs formula as the criteria but it kept spitting out 0 when it should have spit out the correct value.
My formula looks like this
=sumifs($D:$D,$A:$A,$B$4,$C:$C,$B$5,$E:$E,(INDEX(A1:A20,MATCH(MIN(ABS(A1:A20-D1)),ABS(A1:A20-D1),0)))
$E$E is the lookup range for dates, while the index function is the criteria.
Any ideas?
For example, trade date was Dec 5th, I need this to be matched with the date labeled Dec 1st.
The problem I am having is that I am having trouble entering the criteria cell within my sumifs statement to find the closest date.
I was using the formula below embedded in my sumifs formula as the criteria but it kept spitting out 0 when it should have spit out the correct value.
My formula looks like this
=sumifs($D:$D,$A:$A,$B$4,$C:$C,$B$5,$E:$E,(INDEX(A1:A20,MATCH(MIN(ABS(A1:A20-D1)),ABS(A1:A20-D1),0)))
$E$E is the lookup range for dates, while the index function is the criteria.
Any ideas?