I have a data set that have months (Jan-18 through Apr-21) in the columns across the top in Row 1 and Customer Numbers (1 through 100,000) in the rows in Col A.

In each cell within the database (B2-AO100001), each cell has the revenue $ that each customer contributed for each month (there are lots of monthly fluctuations - a customer may go to zero one month and then come back a later month).

I am trying to write a formula that returns the end date for each customer, which I'm defining as the last month a customer had positive revenue. So for example, if Cust 1 had >0 revenue in Apr-21 (the last month in the dataset), the formula would return Apr-21; if a Cust 2 had >0 revenue in Jan-19 and then every month from Feb-21 through Apr-21 =0, the formula returns Jan-19; if Cust 3 had >0 rev in Jan-19 and then went to zero for a few months and then came back as >0 rev in May-19 before returning to zero for all months Jun-19 through Apr-21, it would return May-19.

Hope this makes sense. I can't anonymously share share excel files due to my companies privacy controls so apologies for not being able to attached an example. Let me know if there are questions.

Thanks!