I posted about this previously but think I got confused and in turn confused others so I am going to re-try here. I am working on a longitudinal study collecting data at 5 points in time. We completed the first visit and created a new questionnaire for the second visit. However, our programmer made a mistake and if the question was the same, he created a new variable name instead of keeping it the same. What we wanted was the variable names to remain the same and for them to be identified by the variable "visit_number" to look at change over time. So I have an excel file that has all the variable names from visit 1, matched up with the variables names from visit 2 if the question was identical. What I need to do is convert the variable names from visit 2 to equal the variable name of visit 1 if the question was the same. Visit 1 varname Visit 2 varname travel6mo trav6mo varaa varrra usedrg drguse So I need the visit 2 varnames to be replaces by those in visit 1. I know I can use the RENAME statement but I have about 900 variables that need to be renamed, that is why we created an excel file first, to match things up. Please let me know if there is a way to do this. Please let me know if you have any questions.
... View more