I am trying to find a formula in excel which will find the last cell that has a value and then it to check if the adjacent cells have value and if it has values then it should show the sum until it reaches a blank cell in the reverse direction on cell O1 and also should show the count of the cell in P1.

