Stata can import excel files, but it assumes that the variable names in the column headers are unique and appear in a single row. The attached file is an exception. It gives the number of children in a sample of about 50 schools who are malnourished, underweight, normal, overweight, or suffer from obesity or severe obesity. These column headers are in row 2 and they repeat: the headers for columns B-G are the same as for columns H-M. The difference is that columns B-G refer to boys and columns H-M refer to girls -- but this is only clear from the merged cells in row 1.

When column labels are split across two rows this way, is there any convenient way to import them as variable names? It would be great if they came through as boys_malnourished, girls_malnourished, etc.

I can edit the column labels to be unique, but that's not convenient since in my real data there are more files and more columns....

Thanks for any ideas!

Best wishes,
Paul