I have extracted some data, which is text information with a unique key. In some (or most) circumstances the data is formatted on different lines with the same unique key.
To keep fidelity of the format it was extracted, I want to add a sequential number, restarting when the unique key changes. Any ideas?
A12 SWITCH: TEMPERATURE
A12 Model 123
A12 Supplier: Acme
B21 Gasket
C54 SWITCH: TEMPERATURE
C54 Model 124
C54 Supplier: Acme
D66 Blah
A12 1 SWITCH: TEMPERATURE
A12 2 Model 123
A12 3 Supplier: Acme
B21 1 Gasket
C54 1 SWITCH: TEMPERATURE
C54 2 Model 124
C54 3 Supplier: Acme
D66 1 Blah
Any ideas?
#