I have the below array formula which filteres for uniques in column L where column P is within 7 days of the date in column R (and K = central and G = S16). It works perfectly ok but does not quite do what I now need.
Column L will contain the same code multiple times, I only ever want it to return once for any given code and this is what it currently does perfectly ok. The complication is that for column P there may be several different dates associated with that one code in column L, and I need only the latest of those dates to be within a week of column R, if the latest date is not within that range, then it returns nothing. At the moment I assume what it will do is stop at the first instance of a code and use whatever date is in column P, but I only want it counted if it is the latest date in column P that has that code.
Column L will contain the same code multiple times, I only ever want it to return once for any given code and this is what it currently does perfectly ok. The complication is that for column P there may be several different dates associated with that one code in column L, and I need only the latest of those dates to be within a week of column R, if the latest date is not within that range, then it returns nothing. At the moment I assume what it will do is stop at the first instance of a code and use whatever date is in column P, but I only want it counted if it is the latest date in column P that has that code.
Code:
=SUM(IF(FREQUENCY(IF('[Notice Advanced Find View.xlsx]Notice Advanced Find View'!$K$2:$K$20000="Central",IF(LEFT('[Notice Advanced Find View.xlsx]Notice Advanced Find View'!$G$2:$G$20000,3)="S16",IF('[Notice Advanced Find View.xlsx]Notice Advanced Find View'!$P$2:$P$20000>=$R24,IF('[Notice Advanced Find View.xlsx]Notice Advanced Find View'!$P$2:$P$20000<$R24+7,MATCH('[Notice Advanced Find View.xlsx]Notice Advanced Find View'!$L$2:$L$20000,'[Notice Advanced Find View.xlsx]Notice Advanced Find View'!$L$2:$L$20000,0))))),ROW('[Notice Advanced Find View.xlsx]Notice Advanced Find View'!$L$2:$L$20000)-ROW('[Notice Advanced Find View.xlsx]Notice Advanced Find View'!$L$2)+1),1))
Last edited: