Find Duplicate

gnusmas

Board Regular
Joined
Mar 5, 2014
Messages
186
Hi Friend i have sheet with the following values my last range is a refenrence.
I need <acronym title="visual basic for applications">vba</acronym> code to find duplicate IF the neighbors values "+1" OR "-1".
Exemple:

111214223147
061328294243
212327283348
010511202230
161824293644

<tbody>
</tbody>

162534414547
153235364247
060827283147
131420282933
091116194244

<tbody>
</tbody>

Sheet 2 Result

29
28
20

<tbody>
</tbody>

28
28
19

28 33 48

<tbody>
</tbody>

<tbody>
</tbody>

47
2933

<tbody>
</tbody>
Etc...

Thank you for Help!!
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
clear as mud to me

define neighbours

are neighbours up down left right and diagonal

no takers after this time means people do not understand what you want usually....
 
Upvote 0
Thank you friend I apreciate your help !!
Yes the neighbours are up down left right and diagonal!!
Another exemple :

010212304047
091017182247
012130364548
040620293137
132024252944

<tbody>
</tbody>

111214223147
061328294243
212327283348
010511202230
161824293644

<tbody>
</tbody>

30 36 45 in range A1:F5

29 36 44 in range A7:F11

Ray = Array(Array(0, 1), Array(1, 1), Array(1, 0), Array(1, -1), Array(0, -1), Array(-1, -1), Array(-1, 0), Array(-1, 1))

I hope you understand my exemple!
 
Upvote 0
30 36 45 in range A1:F5

30 36 45 in range A7:F11

"36" in the second exemple and it is duplicate when you look the values left and right the neighbors +1,-1
30 36 45
29 36 44
I hope it help you!!
 
Upvote 0

Forum statistics

Threads
1,214,827
Messages
6,121,823
Members
449,049
Latest member
cybersurfer5000

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