Reading excel files is guesswork, because in excel the concept of typed columns does not exist in a reliable way.
If something does not work as expecting sharing the log is always a good idea, so that others know what actually happened.
If both datasets have all variables in common, a merge without renaming the variable in one of the datasets won't allow comparison of values.
The if statement
if a and b and (existing ne revised);
means: keep all observations being in both dataset where the variable existing and revised are not equal. Most likely not what your expected to happen.
... View more