Reputation: 39
I am trying to make a table where a cell in each subsequent row subtracts from the previous one to show the change between the two. The problem is each row isn't always populated so something like A2-A3 then A3-A4, A4-A5, etc. will not work.
How can I skip blank rows in the formula to achieve a result like shown in the attached image (A6 being subtracted from A3 since A4/A5 are blank).
Thanks,
Upvotes: 0
Views: 79
Reputation:
In b3,
=if(a3<>"", abs(a3 - index(a:a, match(1e99, a$1:a2))), "")
I wasn't sure how you wanted to handle the subtraction so I made the difference an absolute value.
Upvotes: 2