Hello, I am looking for some assistance on trying to come up with some VBA code to check that an ID number isn't repeated for a particular block of data. The data block sizes can change though.
Here is a sample of the data.
<tbody>
</tbody>
I want to make sure that any row that has a "3000" in it has a unique value. But the 3000 records are driven by and linked to the preceding 2100 record. And, as it shows in the data, a 2100 record does NOT have to have a 3000 record to go with it.
So if I find a 2100 record followed by a 3000 record I then need to look at column-E and make sure that the sequence starts with 1 and does not repeat for any 3000 record under that 2100 record. If it does, I want to highlight the cell red and turn the font a bold yellow color.
The data size can vary and it needs to be able to account for the data in column-E being consecutive, no skips or jumps in that sequence.
Thanks for any assistance.
Phil
Here is a sample of the data.
B | C | D | E | |
23 | 1000 | x | x | 02022018092900 |
24 | 2100 | x | x | PG001 |
25 | 3000 | x | x | 1 |
26 | 3000 | x | x | 2 |
27 | 3000 | x | x | 3 |
28 | 2100 | x | x | PG102 |
29 | 2100 | x | x | PG001 |
30 | 3000 | x | x | 1 |
31 | 3000 | x | x | 2 |
<tbody>
</tbody>
I want to make sure that any row that has a "3000" in it has a unique value. But the 3000 records are driven by and linked to the preceding 2100 record. And, as it shows in the data, a 2100 record does NOT have to have a 3000 record to go with it.
So if I find a 2100 record followed by a 3000 record I then need to look at column-E and make sure that the sequence starts with 1 and does not repeat for any 3000 record under that 2100 record. If it does, I want to highlight the cell red and turn the font a bold yellow color.
The data size can vary and it needs to be able to account for the data in column-E being consecutive, no skips or jumps in that sequence.
Thanks for any assistance.
Phil