I have an excel sheet which captures the number of orders that the Customer has made every month. I now require a column which populates the number of times when the customer made orders in 2 consecutive months. The excel looks something like this:
Here in the excel orders placed in consecutive months add up to the count. Say if I have orders in 4 consecutive months it sums to 2 in the count column and 3 shows up in the count column when there are orders for 6 consecutive months.
Taking Customer C1 as example, the first set of months with consecutive orders under them are April and May which map as 1. As we have already captured May in our calculation moving on from June the next set of consecutive months with orders that is encountered is August and September which map as 1. Moving ahead with October there are no more months with consecutive orders. So it sums to 2 for C1 which is mapped to Column M.
I have currently populated the column "M" data for reference but as the customer data becomes huge this is pretty tedious. I am trying to use FREQUENCY to do it but am somehow faltering to come up with a proper excel formula for this scenario. Can anyone help me this?
TIA