# If a cell has a value, how to subtract first nonblank cell from adjacent column

Hi guys. So I’m going to try to explain this as well as I can, but might fail. I have three columns, let’s day A, B, and C. So I tried to kind of show what I am looking at below. Pretend like column A1 represents 100, B2 represents 2, and we are looking for the value for C1. What I want is for column C to return the value of A1 – B2, or 98 in this case. The issue is the columns between each set of data might vary, so I can’t just do a simple subtracting formula. So I was thinking that C1 could check A1 to see if it has a value, and if it does, to subtract the first non blank cell below it in column B from it. That’s the formula I am looking for to enter into column C, but I haven’t figured it out. Let me know if you have any suggestions! Thanks!

A       B       C

1    100              98

2              2

3    500              492

4

5

6         8

400              388

8

9        12

By: Charlotte