Jabso
Brownlow Medallist
- Joined
- Apr 13, 2001
- Posts
- 20,567
- Reaction score
- 627
- Location
- Melbourne
- AFL Club
- Collingwood
- Other Teams
- Tottenham
I have thousands of lines similar to this:
The last column are the intended results I want from the formula.
I want an if statement that shows significant changes which I define as:
- If the numbers INCREASE by MORE THAN 1 I want it to show yes.
- If the numbers DECREASE at all I want it to show yes.
- There are blanks. I want it to ignore those (i.e. don't treat as zero)
- If possible if in one period there is say 4 and then there is a blank period proceeded by a 6 I want it flagged as "YES".
The best I could come up with was a formula of nested if statements that showed if it has changed at all which wasn't 100% 'watertight'. It was something like if the average of those 6 (or less) numbers does not equal the first non blank number (hence the nested if statements) then mark it as "Yes". The reason why it wasn't watertight is there are occasions where the average may equal the first number but still have different numbers (for example 10, 5, 20, 5. The average is 10. It would be marked as "no"). Am I missing a simple formula I'm not familiar with?
Code:
Period 1 2 3 4 5 6
Item 1 4 4 4 4 4 4 No
Item 2 4 4 4 5 5 5 No
Item 3 3 3 3 10 10 10 Yes
Item 4 4 4 4 4 4 No
Item 5 9 9 9 9 8 8 Yes
The last column are the intended results I want from the formula.
I want an if statement that shows significant changes which I define as:
- If the numbers INCREASE by MORE THAN 1 I want it to show yes.
- If the numbers DECREASE at all I want it to show yes.
- There are blanks. I want it to ignore those (i.e. don't treat as zero)
- If possible if in one period there is say 4 and then there is a blank period proceeded by a 6 I want it flagged as "YES".
The best I could come up with was a formula of nested if statements that showed if it has changed at all which wasn't 100% 'watertight'. It was something like if the average of those 6 (or less) numbers does not equal the first non blank number (hence the nested if statements) then mark it as "Yes". The reason why it wasn't watertight is there are occasions where the average may equal the first number but still have different numbers (for example 10, 5, 20, 5. The average is 10. It would be marked as "no"). Am I missing a simple formula I'm not familiar with?



