Hi bobf,
The thing is, for this second data set I only have IDs with the NA prefix. So I don't have to be concerned with the data that do not have the NA prefix. Now, I have tried both yours and grep's inital suggestions and your last updated one, however the output file comes up blank...what is going on?