Hello Seniors /Experts,
Sample Workbook is attached.
Background
Data range A31:M205. Row 31 acts as HEADER. This list will keep expanding down as days progresses in Column B, and corresponding data will be filled in adjacent cells.
Currently, Last Cell is B205, and corresponding value exist in Cell M205.
LATEST VALUE in cell M205 is 57.43, which has to be compared with preceding upside N values in same Column M.
Last range (N Days) which has to be compared could be last 50, 100, 150, or any custom number to lookback (upside from last Cell in Column M) for comparision purpose. This control (lookback number) could be in Cell E11
Currently I am using formula
in Cell E12. As and when new data (days) comes in, range will expand but always beginning from M31 which is header, and real data starts from M32, and Range will keep rolling like, M32:M204 (last row 205), M33:M205 (last row 206), M34:M206 (last row 207) and so on.
Above formula compares number of cells within Range (M32:M204), that has value less than what is being specified in Cell M205
(M205 is 57.43. Occurrence 1) M58=66.1, Occurrence 2) M117 has 59.07, and Occurrence 3) M118 has 82.49 values which are above M205 value of 57.43)
So, result is Number of times, last value = 170 out of 174 rows (I guess, one is missing number of record is 174 [Row 32 to row 205 = 174], three occurrence should return 171 !!!)
QUERY
How should I change the Formula to achieve the result considering
Last Cell in Column M is always changes, and goes down, as number of days gets update in future.
Look-back period, (controlled through Cell E11) should make comparison range in last N Days only which will also keep moving ignoring the last Cell in Column M and count / compare in reverse direction.
Thanks for your valuable time, and guidance.
P.S.: My earlier thread was here, but i guess, that could not be twisted to get desired result here in above case !!!
https://www.excelforum.com/excel-for...nding-row.html
Bookmarks