I have the following problem. I use excel's SLOPE function. However, I constantly have to adjust the input range manually -> eg sometimes its SLOPE(A2:A50) and then SLOPE(A2:A75), depending how many input variables I have.
Is there a way I can change the function so that it always takes the range up until the last non-empty cell so that I don't have to adjust manually every time?
Many thanks in advance!

dynamic named rangethen your formula is just=SLOPE(name)