I am trying to write a formula in Excel that will find the closest match in one column and return that value, so that it can be used in a SUMIFS formula. I have done some investigating and found that everyone points at this specific formula:
{=INDEX(data,MATCH(MIN(ABS(data-value)),ABS(data-value),0))}
The issue I am having though is I am trying to convert this to use data from a Table and have this so far:
{=INDEX(_CCD01[[#All],[Date]],MATCH(MIN(ABS(_CCD01[[#All],[Date]]-TODAY())),ABS(_CCD01[[#All],[Date]]-TODAY()),0))}
But Excel returns a #VALUE! error.
What the formula needs to do, is find the closest date in column _CCD01[[#All],[Date]] using TODAY() as the search criteria.
The file with the table and formula can be found here: Dropbox Read Only
Any help or thoughts will be appreciated.
Dave
0on the thirdMATCHparameter, you are looking for an exact match (which btw is not the cause of your error itself) - JvdVMIN(ABS(…))part of the formula. - Ron Rosenfeld