1

There are 11 numbers in a column.

5 
5
5
5
12
13
5
9
2
5
10

I need to build a formula that tells me how many times occurs the following situation: Number is bigger than each of previous four numbers.

In this case the situation occurs 3 times. By:

12 bigger than 5;5;5;5
13 bigger than 12;5;5;5
10 bigger than  5;2;9;5

1 Answer 1

1

Assuming your data starts in A1 you can use if() and max() to do this. Add this to B5 (next to the 12 in your example):

=IF(MAX(A1:A4)<A5, 1, "")

This will put a 1 next to 12. You can copy this formula down to find the other values where this is true.

This works by looking at the MAX() value of the previous 4 values. IF() they are higher than the current value, then it prints a 1.

Sign up to request clarification or add additional context in comments.

1 Comment

and then you need to take the sum of colum B to get your count of how many times it has happened

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.