SAS and VBA both have their unique and quick ways to replace values in one or multiple columns. VBA
VBA has a wonderful function Replace for several columns or regions, where the changes are likely to be happened.
.Replace "F", "Female"
.Replace "M", "Male"
User-defined format by PROC FORMAT is the best way for quick replacements.
'F' = 'Female'
'M' = 'Male'
format sex $sex.;
For some data management operations such as string/number replacement, it is better way to use the languages' built-in features, instead of the loops and condition statements.