Thread: VB Help
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Shon Shon is offline
external usenet poster
 
Posts: 8
Default VB Help

I have posted before about finding duplicate data but have now changed the
criteria of what I am looking for and really think I need vb code to perform
the following task?. Any help would be gratefully appreciated!.

What I want to be able to do is look down my rows of data and at each change
in the item number look at the location code for this record and keep (or
mark with an x) this record and any other records that are the same until the
next change in item number. If there is only 1 item number and no duplicates
I would like to keep this record aswell. e.g. if I have the following data;

Item Number Location
2345 AA1
2345 AA2
2345 AA1
2345 AA2
5432 BB1
1234 CC1
1234 CC4
1234 CC5
1234 CC1
1234 CC4

I would like to see the following results (either removing the records, or
putting an x next to them, in this example I have put an x next to them;

Item Number Location
2345 AA1 x
2345 AA2
2345 AA1 x
2345 AA2
5432 BB1 x
1234 CC1 x
1234 CC4
1234 CC5
1234 CC1 x
1234 CC4

Therefore the item number is the key criteria followed by the location of
the first item number. I REALLY hope this makes sense as I think I have not
been clear in the past!