Hello,

I have a variable, date that is empty.
and a series of other date variables that contain date data: ecdate bcdate mhdate...
I also have a string variable, prefix, that contains string values such as: ec, bc, mh ...

How can I replace date with the value in one of the other date variables (i.e. ecdate bcdate mhdate...) for rows where the variable name begins with the value of prefix?

I hope I explained clearly enough.

Thank you!