Conditional formula to return true/false, based on the values of a group of cells

FlynnXYZ

New Member
Joined
Oct 10, 2017
Messages
4
I need to check true/false based on the values of 5 cells, I cannot have the numbers in the array be followed by the next more than 2 times.

Example:

1,2,5,7,9 true

1,2,3,5,8 false

10,11,12,13,18 false

Any thoughts on how to achieve this?
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
Welcome to Mr Excel

Maybe this array formula
=(MAX(FREQUENCY(IF(B1:E1=A1:D1+1,COLUMN(B1:E1)),IF(B1:E1<>A1:D1+1,COLUMN(B1:E1))))+1<3)
confirmed with Ctrl+Shift+Enter, not just Enter

Hope this helps

M.
 
Upvote 0
Welcome to Mr Excel

Maybe this array formula
=(MAX(FREQUENCY(IF(B1:E1=A1:D1+1,COLUMN(B1:E1)),IF(B1:E1<>A1:D1+1,COLUMN(B1:E1))))+1<3)
confirmed with Ctrl+Shift+Enter, not just Enter

Hope this helps

M.

Marcelo,
What does Control + Shift + Enter do, as opposed to just hitting Enter?

Thanks,
 
Upvote 0
If the numbers are all in sequential order, perhaps:
=SUMPRODUCT(--(A1:D1=B1:E1-1))<2
 
Last edited:
Upvote 0
If the numbers are all in sequential order, perhaps:
=SUMPRODUCT(--(A1:D1=B1:E1-1))<2

Hi Scott

This was the first formula i tried. But i wasn't sure about the expected result in this case

[TABLE="class: grid"]
<tbody>[TR]
[TD]
10​
[/TD]
[TD]
11​
[/TD]
[TD]
14​
[/TD]
[TD]
15​
[/TD]
[TD]
18​
[/TD]
[/TR]
</tbody>[/TABLE]

Let's wait what the OP says...

M.
 
Upvote 0
Works like a charm, thank you so much :)

Have you seen my last post? What is the expected result for

[TABLE="class: grid"]
<tbody>[TR]
[TD]
10​
[/TD]
[TD]
11​
[/TD]
[TD]
14​
[/TD]
[TD]
15​
[/TD]
[TD]
18​
[/TD]
[/TR]
</tbody>[/TABLE]

True or False?

M.
 
Upvote 0
True like it should, I tried similar combinations right after I saw your post.
Big thank you from Portugal ;)
 
Upvote 0
True like it should, I tried similar combinations right after I saw your post.
Big thank you from Portugal ;)

You are very welcome!

If the expected result is True in the mentioned case you need the array formula i posted above. I've tried to create a regular formula (non-array) to no avail :(.
Maybe someone else...

Saudações :)

M.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top