I need a function in Excel 2013 that returns a dynamic cell reference within a range of cells in a single column. This must handle anywhere from 2 to 24 rows, depending on the number of months the client is modeling their sales data.
The cell reference highlighted in red is the cell reference I need to have dynamically referenced in the function. It appears to be static here, but that is just because it currently refers to the last cell of the current range - $C15. However, if I were to model 7 or more (or fewer) months, the cell address reference would change accordingly. I have tried to insert different functions in the E$15
position, but it always returns a #VALUE
error.
I have a function that works as I need it to, but I'm using the ROW()
function to return the cell address of a user-input data. This user-input data is always the last cell in the column (2-24), but needs to be referenced by the cells above it in order to model the data correctly.
=IF(A11=Impact_Over_Months,Retention_Range_Min,IF(A11>Impact_Over_Months,"",(ROW()-ROW(C$10))/(ROW(C$15)-ROW(C$10))*(LOOKUP(2,1/($C$10:$C$33<>""),$C$10:$C$33)-Retention_Range_Max)+Retention_Range_Max))
The problem is in this section - /(ROW(C$15)-ROW(C$10))*
, where the function ROW(C$15)
has to return the dynamic cell reference to the last row in the data set.
I have tried OFFSET, INDEX, MATCH, and others in different combinations, but to no avail. Can anyone offer a solution that does NOT involve VBA?