I have the formula
=IF(ISBLANK(B48), "",MINUS(B48,B2))
Where 48 should be the current row number
(so the formula for row 40 is:
=IF(ISBLANK(B40), "",MINUS(B40,B2))
b2 is always the same.
I try to apply this formula to multiple rows, but when I drag the formula It updates the b2 value.
So for every row I have to update the b2 value.
Is there a way to apply the formula to multiple lines (the best would be the whole column after row 2) without having to change the b2 value for every row?
Best Answer
You need to "freeze" the cell
B2
by using the dollar sign$
and useB$2
instead.Then your formula will be:
You can take it a step further by using an arrayformula:
(please adjust the ranges as needed)
Function
ArrayFormula
.