Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

adding a count field

Status
Not open for further replies.

chalcopyrites

Technical User
Mar 11, 2004
12
GB
Hello,

I have a file like this:

148-BP
1585 1484
1869 1503
2027 1539
999 999 999
148-BP
1674 1471
1869 1483
2183 1557
2392 1593
999 999 999
172-BP
3099 1500
3335 1512
3641 1579
3862 1625
4172 1682
999 999 999
172-BP
3131 1489
3356 1521
999 999 999 etc...

which I would like to look like this, with an incrementing value added to all the records between *BP and '999 999 999':

148-BP
1 1585 1484
2 1869 1503
3 2027 1539
999 999 999
148-BP
1 1674 1471
2 1869 1483
3 2183 1557
4 2392 1593
999 999 999
172-BP
1 3099 1500
2 3335 1512
3 3641 1579
4 3862 1625
5 4172 1682
999 999 999
172-BP
1 3131 1489
2 3356 1521
999 999 999

I just dont know where to begin!

Many thanks

Erica




 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top