Hi,
I am trying to find a way of counting the number of days between two dates dependant on the results in the last few rows of another column. In the first example below, because the result in row 6 and 7 of column B is equal, I need to calculate the number of days between these equal numbers. (21/06/2020 - 19/06/2020 = 2 days). As I add more data as in example 2, the previous calculated 2 days will be ignored, as there have been further days when the numbers in B weren't equal. At row 11 number 627 is repeated so 2 days should be retuned. Followed by 11 days and 18 days as the data is added to row 12 and 13.
I've spent a lot of time trying to solve this myself, but am struggling because of getting the formula to reference the last rows where I have data. Any help to point me in the right direction would be gratefully received.
I am trying to find a way of counting the number of days between two dates dependant on the results in the last few rows of another column. In the first example below, because the result in row 6 and 7 of column B is equal, I need to calculate the number of days between these equal numbers. (21/06/2020 - 19/06/2020 = 2 days). As I add more data as in example 2, the previous calculated 2 days will be ignored, as there have been further days when the numbers in B weren't equal. At row 11 number 627 is repeated so 2 days should be retuned. Followed by 11 days and 18 days as the data is added to row 12 and 13.
I've spent a lot of time trying to solve this myself, but am struggling because of getting the formula to reference the last rows where I have data. Any help to point me in the right direction would be gratefully received.