I have a large spreadsheet with duplicate entries adjacent on 2 rows is there a formula for this they are marriages and need pairing up as you can see from the reference numbers on right side are the same that I have edited. They are in pairs with the same reference
[TABLE="width: 769"]
<colgroup><col><col><col><col><col span="3"><col><col><col></colgroup><tbody>[TR]
[TD="align: right"]14[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]1858[/TD]
[TD] GREEN[/TD]
[TD]William[/TD]
[TD]SHERRNGTON[/TD]
[TD]Jane[/TD]
[TD]C29[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]121[/TD]
[/TR]
[TR]
[TD="align: right"]14[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]1858 [/TD]
[TD]SHERRNGTON[/TD]
[TD]Jane[/TD]
[TD]GREEN[/TD]
[TD]William[/TD]
[TD]C29[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]121[/TD]
[/TR]
[TR]
[TD="align: right"]28[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]1858[/TD]
[TD] DARBYSHIRE[/TD]
[TD]Leigh[/TD]
[TD]ARMSTEAD[/TD]
[TD]Elizabeth[/TD]
[TD]C29[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]122[/TD]
[/TR]
[TR]
[TD="align: right"]28[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]1858[/TD]
[TD] ARMSTEAD[/TD]
[TD]Elizabeth[/TD]
[TD]DARBYSHIRE[/TD]
[TD]Leigh[/TD]
[TD]C29[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]122[/TD]
[/TR]
[TR]
[TD="align: right"]8[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]1858[/TD]
[TD]GREGORY[/TD]
[TD]William[/TD]
[TD][/TD]
[TD][/TD]
[TD]C29[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]123[/TD]
[/TR]
[TR]
[TD="align: right"]8[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]1858[/TD]
[TD]DEAN[/TD]
[TD]Jane[/TD]
[TD][/TD]
[TD][/TD]
[TD]C29[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]123[/TD]
[/TR]
[TR]
[TD="align: right"]15[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]1858[/TD]
[TD]SMITH[/TD]
[TD]Peter[/TD]
[TD][/TD]
[TD][/TD]
[TD]C29[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]125[/TD]
[/TR]
[TR]
[TD="align: right"]15[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]1858[/TD]
[TD]PARKINSON[/TD]
[TD]Elizabeth[/TD]
[TD][/TD]
[TD][/TD]
[TD]C29[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]125[/TD]
[/TR]
[TR]
[TD="align: right"]20[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]1858[/TD]
[TD]BENNISON[/TD]
[TD]William[/TD]
[TD][/TD]
[TD][/TD]
[TD]C29[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]126[/TD]
[/TR]
[TR]
[TD="align: right"]20[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]1858[/TD]
[TD]THOMPSON[/TD]
[TD]Ann[/TD]
[TD][/TD]
[TD][/TD]
[TD]C29[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]126[/TD]
[/TR]
[TR]
[TD="align: right"]29[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]1858[/TD]
[TD]WOOD[/TD]
[TD]James[/TD]
[TD][/TD]
[TD][/TD]
[TD]C29[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]127[/TD]
[/TR]
[TR]
[TD="align: right"]29[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]1858[/TD]
[TD]LEIGH[/TD]
[TD]Margaret[/TD]
[TD][/TD]
[TD][/TD]
[TD]C29[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]127[/TD]
[/TR]
[TR]
[TD="align: right"]3[/TD]
[TD="align: right"]4[/TD]
[TD="align: right"]1858[/TD]
[TD]KENYON[/TD]
[TD]Ralph[/TD]
[TD][/TD]
[TD][/TD]
[TD]C29[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]128[/TD]
[/TR]
[TR]
[TD="align: right"]3[/TD]
[TD="align: right"]4[/TD]
[TD="align: right"]1858[/TD]
[TD]HUNTER[/TD]
[TD]Ellen[/TD]
[TD][/TD]
[TD][/TD]
[TD]C29[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]128[/TD]
[/TR]
[TR]
[TD="align: right"]4[/TD]
[TD="align: right"]4[/TD]
[TD="align: right"]1858[/TD]
[TD]ASHTON[/TD]
[TD]Joseph[/TD]
[TD][/TD]
[TD][/TD]
[TD]C29[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]129[/TD]
[/TR]
[TR]
[TD="align: right"]4[/TD]
[TD="align: right"]4[/TD]
[TD="align: right"]1858[/TD]
[TD]GREGORY[/TD]
[TD]Jane[/TD]
[TD][/TD]
[TD][/TD]
[TD]C29[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]129[/TD]
[/TR]
</tbody>[/TABLE]
[TABLE="width: 769"]
<colgroup><col><col><col><col><col span="3"><col><col><col></colgroup><tbody>[TR]
[TD="align: right"]14[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]1858[/TD]
[TD] GREEN[/TD]
[TD]William[/TD]
[TD]SHERRNGTON[/TD]
[TD]Jane[/TD]
[TD]C29[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]121[/TD]
[/TR]
[TR]
[TD="align: right"]14[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]1858 [/TD]
[TD]SHERRNGTON[/TD]
[TD]Jane[/TD]
[TD]GREEN[/TD]
[TD]William[/TD]
[TD]C29[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]121[/TD]
[/TR]
[TR]
[TD="align: right"]28[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]1858[/TD]
[TD] DARBYSHIRE[/TD]
[TD]Leigh[/TD]
[TD]ARMSTEAD[/TD]
[TD]Elizabeth[/TD]
[TD]C29[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]122[/TD]
[/TR]
[TR]
[TD="align: right"]28[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]1858[/TD]
[TD] ARMSTEAD[/TD]
[TD]Elizabeth[/TD]
[TD]DARBYSHIRE[/TD]
[TD]Leigh[/TD]
[TD]C29[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]122[/TD]
[/TR]
[TR]
[TD="align: right"]8[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]1858[/TD]
[TD]GREGORY[/TD]
[TD]William[/TD]
[TD][/TD]
[TD][/TD]
[TD]C29[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]123[/TD]
[/TR]
[TR]
[TD="align: right"]8[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]1858[/TD]
[TD]DEAN[/TD]
[TD]Jane[/TD]
[TD][/TD]
[TD][/TD]
[TD]C29[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]123[/TD]
[/TR]
[TR]
[TD="align: right"]15[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]1858[/TD]
[TD]SMITH[/TD]
[TD]Peter[/TD]
[TD][/TD]
[TD][/TD]
[TD]C29[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]125[/TD]
[/TR]
[TR]
[TD="align: right"]15[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]1858[/TD]
[TD]PARKINSON[/TD]
[TD]Elizabeth[/TD]
[TD][/TD]
[TD][/TD]
[TD]C29[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]125[/TD]
[/TR]
[TR]
[TD="align: right"]20[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]1858[/TD]
[TD]BENNISON[/TD]
[TD]William[/TD]
[TD][/TD]
[TD][/TD]
[TD]C29[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]126[/TD]
[/TR]
[TR]
[TD="align: right"]20[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]1858[/TD]
[TD]THOMPSON[/TD]
[TD]Ann[/TD]
[TD][/TD]
[TD][/TD]
[TD]C29[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]126[/TD]
[/TR]
[TR]
[TD="align: right"]29[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]1858[/TD]
[TD]WOOD[/TD]
[TD]James[/TD]
[TD][/TD]
[TD][/TD]
[TD]C29[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]127[/TD]
[/TR]
[TR]
[TD="align: right"]29[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]1858[/TD]
[TD]LEIGH[/TD]
[TD]Margaret[/TD]
[TD][/TD]
[TD][/TD]
[TD]C29[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]127[/TD]
[/TR]
[TR]
[TD="align: right"]3[/TD]
[TD="align: right"]4[/TD]
[TD="align: right"]1858[/TD]
[TD]KENYON[/TD]
[TD]Ralph[/TD]
[TD][/TD]
[TD][/TD]
[TD]C29[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]128[/TD]
[/TR]
[TR]
[TD="align: right"]3[/TD]
[TD="align: right"]4[/TD]
[TD="align: right"]1858[/TD]
[TD]HUNTER[/TD]
[TD]Ellen[/TD]
[TD][/TD]
[TD][/TD]
[TD]C29[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]128[/TD]
[/TR]
[TR]
[TD="align: right"]4[/TD]
[TD="align: right"]4[/TD]
[TD="align: right"]1858[/TD]
[TD]ASHTON[/TD]
[TD]Joseph[/TD]
[TD][/TD]
[TD][/TD]
[TD]C29[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]129[/TD]
[/TR]
[TR]
[TD="align: right"]4[/TD]
[TD="align: right"]4[/TD]
[TD="align: right"]1858[/TD]
[TD]GREGORY[/TD]
[TD]Jane[/TD]
[TD][/TD]
[TD][/TD]
[TD]C29[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]129[/TD]
[/TR]
</tbody>[/TABLE]