I have a formula in column C that returns a value of 1, if the corresponding cell in column F is greater than 1,000. If it's less than 1,000, it returns a value of -1.

I need some help with a formula in column D where I would like to increment its corresponding cell's value by 1, if column C's value is 1. I can't figure out how to ignore the cells that equals -1 and go up the last cell in column C that equals 1 and increment based on that value.

Example, in D7, I would like my formula to ignore C6 since it's -1, and pick-up the 488 value in D5 and return 489 in D7.

Thank you