I have a column like the following:

```
     A | B | C
1| 1001|   | What formula?
2| 1002|No |
3| 1003|   |
4| 1004|No |
5| 1005|   |
6| 1006|   |
7| 1007|No |

```

I want to have something like this:

```
    A  | B | C
1| 1001|   | 1001
2| 1002|No |
3| 1003|   | 1002
4| 1004|No |
5| 1005|   | 1003
6| 1006|   | 1004
7| 1007|No |
8| 1008|   | 1005

```

So, basically the value in C, is the increment of last C value. I don't have any problem when how to indicate a cell is blank or not using IF, but for the increment value, i have some trouble.
So far i do have this formula for column C, but it's not working.

```
=IF(A2="", CELL("contents",C1)+1, IF(B2="","",MID(B2,1,4)+1))

```

What should i fix in the formula?

Thanks.