I am trying to convert some long lists of values in Excel and I basically need to create a long list of foreach and forvalues loops which I will then transfer to STATA to execute. When I try to program a loop in one single line, I keep getting 'program error: code follows on the same line as open brace'. Is there a delimiter I could put in the code so I can keep it in one line. This is the code I am trying to use. Sorry but I am a bit rusty in my STATA.

foreach i = "C30.0", "C31" {forvalues j = 8004, 8032, 8050(1)8076, 8078, 8083(1)8084, 8123, 8560, 8980 {display `i';",";`j' } }

Thanks again

Neville