If you are looking for the streak of "increased/same profit" starting from current year, try the below formulas in the 2nd row:
- in cell K2: =IF(B2>=A2,1,0)
- in cell S2: =IF(K2=1,A4+K2,K2)
- in cell J2: =Z2
then copy the cell K2
to the range L2:R2
, cell S2
to the range T2:Z2
, and then copy the range J2:Z2
to all the applicable rows as per below pic.
Note: instead of filling-up with formulas in rows 3 & 4, sure it can be done directly in cell J2
by way of Excel array, but for the sake of simplicity this method is preferable.
Edit: the above post was updated as per subsequent discussion with @technotoast to make the following adjustments:
- there are many companies in the list - not just "Apple"
- the streak will continue for same profit levels also - not just increasing profit
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…