I have 8000+ rows, with a few being added each day. I need to run calculations on the last ten, 20, or other number rows throughout the day, but with rows being added every day, I have no fixed point from which to start. The last entry could be in row D2520 this morning, but D2564 this afternoon.
I can get the value from the last filled cell (LOOKUP(2,1/(D:D<>""),D:D)) and the row number of the last filled cell (LOOKUP(2,1/(D:H<>""),ROW(D:H))), but I don't know how to, for example, SUM(DLastRowNumber:DLastRowNumber-10). I was tinking a variable equal to the number of rows I need but I don't know how to implement it in a cell reference.
If there is another solution, I'm all for it. I'd rather a formula, but a macro or function is fine. FYI, I'm a VBA newbie.
Thanks in advance.
I can get the value from the last filled cell (LOOKUP(2,1/(D:D<>""),D:D)) and the row number of the last filled cell (LOOKUP(2,1/(D:H<>""),ROW(D:H))), but I don't know how to, for example, SUM(DLastRowNumber:DLastRowNumber-10). I was tinking a variable equal to the number of rows I need but I don't know how to implement it in a cell reference.
If there is another solution, I'm all for it. I'd rather a formula, but a macro or function is fine. FYI, I'm a VBA newbie.
Thanks in advance.