6ftAndClean
Programmer
I have a table (50,000 records) that has data in it that follows the form below. Field A is the main identifier of blocks of data. Field B identifies sub-sets of the data. Field C then gives the number order of data within the sub-sets. Field D represents what I need to achieve: it provides an index to the order of the data overall for each single identifier in field A.
A B C D
1 1 1 1
1 1 2 2
1 1 3 3
1 2 1 4
1 2 2 5
1 3 1 6
1 3 2 7
1 3 3 8
1 3 4 9
2 1 1 1
2 1 2 2
2 1 3 3
2 2 1 4
2 2 2 5
The problems are these (you just knew that here would be some!);
- the data in Field A is in fact a 9 digit number and does not number sequentially (there are many gaps in the numbering sequence)
- the numbers in Fields B & C do number sequentialy from 1 (up to a maximum of 200) as per above example.
- Cruicially Field D MUST number from 1 upwards without any break in numbering for each distinct value in field A (as illustrated above).
I have no idea how to go about achieving this. Do I do this via a query, macro or what? I have a fair idea what shape the coding could take to do this but insufficient experience and skills to actually achieve it. Any help would be very gratefully received.
Nick.
A B C D
1 1 1 1
1 1 2 2
1 1 3 3
1 2 1 4
1 2 2 5
1 3 1 6
1 3 2 7
1 3 3 8
1 3 4 9
2 1 1 1
2 1 2 2
2 1 3 3
2 2 1 4
2 2 2 5
The problems are these (you just knew that here would be some!);
- the data in Field A is in fact a 9 digit number and does not number sequentially (there are many gaps in the numbering sequence)
- the numbers in Fields B & C do number sequentialy from 1 (up to a maximum of 200) as per above example.
- Cruicially Field D MUST number from 1 upwards without any break in numbering for each distinct value in field A (as illustrated above).
I have no idea how to go about achieving this. Do I do this via a query, macro or what? I have a fair idea what shape the coding could take to do this but insufficient experience and skills to actually achieve it. Any help would be very gratefully received.
Nick.