Hi Marta 27, The versions of SAS are essentially identical, yet we get different results (mine being the ones you want), so something else is different besides the capabilities of the SAS Software (assuming no major changes between M3 and M5). First, be sure that the example you posted is the exactly the same as what you ran (I made no changes except to change the libref for the input datasets). My datasets are probably much different from yours, but given the output that should be no issue. Second, I cannot imagine anything in MS-Excel that would fail here, but what are the names of your worksheets? You want one worksheet named "tables1_2" and a second one named "tables3_4" and you are getting a third one, too. Steve
... View more