This works very well. I have to admit that I find it quite hard to get my head around how this bit of code is working. It seems to run backwards to me! I want to set up a ‘Age_start’ and a ‘Age_end’ column and have the age start and age ends being the same year for ages 0 to 89. In addition, I want to make a small change that will allow the '90 and over' to be substituted for '90\t114' in the output. I think that to do this I need to make a change to the grep section and to make the first change I need to change the 'print for map' section. At the moment the 90 and overs are lost from the output. Please enlighten me.