#### ShawnLerner

##### New Member

- Joined
- Nov 3, 2016

- Messages
- 10

How do I write a formula that will count the number of green apples from a dataset like the one below where the odd number rows have fruit type and the even number row right below it has the corresponding fruit colour?

A

1 Apple

2 Green

3 Apple

4 Blue

5 Peach

6 Green

7 Apple

8 Green

In this example the value I want to get is 2. (A1=Apple, A2=Green + A7=Apple, A8=Green)

I think I should be able to do this using Countif and Offset but can't for the life of me figure out how. Any help would be most appreciated!