They are a couple unanswered questions that you dont really cover in your post. And your sample data and output doesnt really answer either, since the input does not match the outpu (ie Kansas output is listed as 76 while only 8 appear in the input). There are three codes for each input line ... so do you want each code to be on its own observation in the output with number of under the zipcode applied to each? Im assuming the total variable on the input is not relevant to the output desired. Im guessing you might have more challenging of time reading in your source if the screen shot is in fact the way the csv is structured (the first three rows are horizontally structured while the remaining are vertically structured). If you can provide more explanation and perhaps an actual sample input file it would help tailor the code to your actual situation. EJ
... View more