Finding Like Combinations of Data Points

Brabed

Board Regular
Joined
Oct 27, 2005
Messages
54
If I have three consecutive cells that have a certain relationship with each other, how can I find a similar relationship within a data range?

Example-My last three cells are 1,3, and 5 and I decide I want to find another place within the data with three consecutive odd numbers.

This is a rough example, I may want to find three consecutive cells whose sum is <9, would be another example.

Thanks in advance....
 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
For your "...with three consecutive odd numbers", here is my solution, assuming your data is in A1:down, enter, in B1:
=IF(AND(A1/2<>INT(A1/2),A2-A1=2,A3-A2=2),A1&", "&A2&", "&A3,"")
and copy down.


For the "sum<9", I would use, say, in C1:
=IF(A1+A2+A3<9,A1&", "&A2&", "&A3,"")
and copy down.
 
Upvote 0

Forum statistics

Threads
1,212,150
Messages
6,106,257
Members
448,009
Latest member
wbarkwell

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