Hi Statalist, I am trying to use a local macro with a foreach loop to clean up some vars. Here is my code:

Code:
local yn1 q1 q2 q7 q8 q10
foreach var of local yn1 {
    replace `var' = upper(`var')
}
I'm not getting any error messages, but it also doesn't seem to be working. I can provide sample data if needed, but I am assuming that there is just some very obvious typo (or some other error/thing I'm leaving out) that can be pointed out without any data...