Column A has: Apple Orange Pear Banana Mango multiple times and in random orders.
Column C has: Red Yellow Green Blue Purple corresponding to column A multiple times and in random orders.
I am looking for a formula which counts or sums all instances where Pear immediately follow Apple (i.e. the row below Apple) AND Pear is also Green.
I can return Apple and Pear and even Pear that are Green separately, but I cannot figure out how to return instances of Pear that are Green which immediately follow Apple.
Have attempted multiple formulas using COUNTIFS, SUMIFS, __OFFSET__but cannot find a working combination. Here is a screenshot of sample data. Book2
