apologies for long post but trying to attach a a spreadsheet failed, i'm trying to mark with an x repeating numbers

the first batch is a small part of the existing, the second part shows how i wish it to look.

This is in pseudo code

from top going downwards

start at B1

go down until value of cell is X

go across to column A

If cell below is = to active cell, place X in column B

if next cell below is = to above cell, place x in column B

if next cell down <> to one above, go to Column B, scroll down to next occurrence of X

so if the cells in column A have the same number, put an x in column b

if not, move down to next occurence of x

[TABLE="width: 128"]

[tr]

[TD="width: 64, align: right"]830[/TD]

[TD="width: 64"]x[/TD]

[/tr]

[tr]

[TD="align: right"]830[/TD]

[td][/td]

[/tr]

[tr]

[TD="align: right"]820[/TD]

[td][/td]

[/tr]

[tr]

[TD="align: right"]805[/TD]

[td][/td]

[/tr]

[tr]

[TD="align: right"]790[/TD]

[td][/td]

[/tr]

[tr]

[TD="align: right"]790[/TD]

[td][/td]

[/tr]

[tr]

[TD="align: right"]790[/TD]

[td][/td]

[/tr]

[tr]

[TD="align: right"]790[/TD]

[td][/td]

[/tr]

[tr]

[TD="align: right"]780[/TD]

[td][/td]

[/tr]

[tr]

[TD="align: right"]780[/TD]

[td][/td]

[/tr]

[tr]

[TD="align: right"]780[/TD]

[td][/td]

[/tr]

[tr]

[TD="align: right"]765[/TD]

[td][/td]

[/tr]

[tr]

[TD="align: right"]765[/TD]

[td][/td]

[/tr]

[tr]

[TD="align: right"]745[/TD]

[td][/td]

[/tr]

[tr]

[TD="align: right"]720[/TD]

[td][/td]

[/tr]

[tr]

[TD="align: right"]830[/TD]

[td]

x

[/td]

[/tr]

[tr]

[TD="align: right"]830[/TD]

[td][/td]

[/tr]

[tr]

[TD="align: right"]830[/TD]

[td][/td]

[/tr]

[tr]

[TD="align: right"]830[/TD]

[td][/td]

[/tr]

[tr]

[TD="align: right"]830[/TD]

[td][/td]

[/tr]

[tr]

[TD="align: right"]830[/TD]

[td][/td]

[/tr]

[tr]

[TD="align: right"]820[/TD]

[td][/td]

[/tr]

[tr]

[TD="align: right"]820[/TD]

[td][/td]

[/tr]

[tr]

[TD="align: right"]820[/TD]

[td][/td]

[/tr]

[tr]

[TD="align: right"]820[/TD]

[td][/td]

[/tr]

[tr]

[TD="align: right"]815[/TD]

[td][/td]

[/tr]

[tr]

[TD="align: right"]805[/TD]

[td][/td]

[/tr]

[tr]

[TD="align: right"]795[/TD]

[td][/td]

[/tr]

[tr]

[TD="align: right"]785[/TD]

[td][/td]

[/tr]

[tr]

[TD="align: right"]785[/TD]

[td][/td]

[/tr]

[tr]

[TD="align: right"]780[/TD]

[td][/td]

[/tr]

[tr]

[TD="align: right"]795[/TD]

[td]

x

[/td]

[/tr]

[tr]

[TD="align: right"]760[/TD]

[td][/td]

[/tr]

[tr]

[TD="align: right"]760[/TD]

[td][/td]

[/tr]

[tr]

[TD="align: right"]760[/TD]

[td][/td]

[/tr]

[tr]

[TD="align: right"]760[/TD]

[td][/td]

[/tr]

[tr]

[TD="align: right"]760[/TD]

[td][/td]

[/tr]

[tr]

[TD="align: right"]760[/TD]

[td][/td]

[/tr]

[tr]

[TD="align: right"]760[/TD]

[td][/td]

[/tr]

[tr]

[TD="align: right"]760[/TD]

[td][/td]

[/tr]

[tr]

[TD="align: right"]760[/TD]

[td][/td]

[/tr]

[tr]

[TD="align: right"]760[/TD]

[td][/td]

[/tr]

[tr]

[TD="align: right"]760[/TD]

[td][/td]

[/tr]

[tr]

[TD="align: right"]760[/TD]

[td][/td]

[/tr]

[tr]

[TD="align: right"]745[/TD]

[td][/td]

[/tr]

[tr]

[TD="align: right"]745[/TD]

[td][/td]

[/tr]

[tr]

[TD="align: right"]745[/TD]

[td][/td]

[/tr]

[tr]

[TD="align: right"]745[/TD]

[td]

[/td]

[/tr]

[/TABLE]

how i want it to look

[TABLE="width: 128"]

[tr]

[TD="width: 64"][/TD]

[TD="width: 64"][/TD]

[/tr]

[tr]

[TD="align: right"]830[/TD]

[td]

x

[/td]

[/tr]

[tr]

[TD="align: right"]830[/TD]

[td]

x

[/td]

[/tr]

[tr]

[TD="align: right"]820[/TD]

[td][/td]

[/tr]

[tr]

[TD="align: right"]805[/TD]

[td][/td]

[/tr]

[tr]

[TD="align: right"]790[/TD]

[td][/td]

[/tr]

[tr]

[TD="align: right"]790[/TD]

[td][/td]

[/tr]

[tr]

[TD="align: right"]790[/TD]

[td][/td]

[/tr]

[tr]

[TD="align: right"]790[/TD]

[td][/td]

[/tr]

[tr]

[TD="align: right"]780[/TD]

[td][/td]

[/tr]

[tr]

[TD="align: right"]780[/TD]

[td][/td]

[/tr]

[tr]

[TD="align: right"]780[/TD]

[td][/td]

[/tr]

[tr]

[TD="align: right"]765[/TD]

[td][/td]

[/tr]

[tr]

[TD="align: right"]765[/TD]

[td][/td]

[/tr]

[tr]

[TD="align: right"]745[/TD]

[td][/td]

[/tr]

[tr]

[TD="align: right"]720[/TD]

[td][/td]

[/tr]

[tr]

[TD="align: right"]830[/TD]

[td]

x

[/td]

[/tr]

[tr]

[TD="align: right"]830[/TD]

[td]

x

[/td]

[/tr]

[tr]

[TD="align: right"]830[/TD]

[td]

x

[/td]

[/tr]

[tr]

[TD="align: right"]830[/TD]

[td]

x

[/td]

[/tr]

[tr]

[TD="align: right"]830[/TD]

[td]

x

[/td]

[/tr]

[tr]

[TD="align: right"]830[/TD]

[td]

x

[/td]

[/tr]

[tr]

[TD="align: right"]820[/TD]

[td][/td]

[/tr]

[tr]

[TD="align: right"]820[/TD]

[td][/td]

[/tr]

[tr]

[TD="align: right"]820[/TD]

[td][/td]

[/tr]

[tr]

[TD="align: right"]820[/TD]

[td][/td]

[/tr]

[tr]

[TD="align: right"]815[/TD]

[td][/td]

[/tr]

[tr]

[TD="align: right"]805[/TD]

[td][/td]

[/tr]

[tr]

[TD="align: right"]795[/TD]

[td][/td]

[/tr]

[tr]

[TD="align: right"]785[/TD]

[td][/td]

[/tr]

[tr]

[TD="align: right"]785[/TD]

[td][/td]

[/tr]

[tr]

[TD="align: right"]780[/TD]

[td][/td]

[/tr]

[tr]

[TD="align: right"]795[/TD]

[td]

x

[/td]

[/tr]

[tr]

[TD="align: right"]760[/TD]

[td][/td]

[/tr]

[tr]

[TD="align: right"]760[/TD]

[td][/td]

[/tr]

[tr]

[TD="align: right"]760[/TD]

[td][/td]

[/tr]

[tr]

[TD="align: right"]760[/TD]

[td][/td]

[/tr]

[tr]

[TD="align: right"]760[/TD]

[td][/td]

[/tr]

[tr]

[TD="align: right"]760[/TD]

[td][/td]

[/tr]

[tr]

[TD="align: right"]760[/TD]

[td][/td]

[/tr]

[tr]

[TD="align: right"]760[/TD]

[td][/td]

[/tr]

[tr]

[TD="align: right"]760[/TD]

[td][/td]

[/tr]

[tr]

[TD="align: right"]760[/TD]

[td][/td]

[/tr]

[tr]

[TD="align: right"]760[/TD]

[td][/td]

[/tr]

[tr]

[TD="align: right"]760[/TD]

[td][/td]

[/tr]

[tr]

[TD="align: right"]745[/TD]

[td][/td]

[/tr]

[tr]

[TD="align: right"]745[/TD]

[td][/td]

[/tr]

[tr]

[TD="align: right"]745[/TD]

[td][/td]

[/tr]

[tr]

[TD="align: right"]745[/TD]

[td][/td]

[/tr]

[/TABLE]