DATA Step, Macro, Functions and more

comparing two excels

Reply
Contributor
Posts: 28

comparing two excels

Hi SAS Users,

 

I want to compare two excel files which I have attached.

having Subject ID, VISITREFNAME Record identifier are the common variables in both excels.

unmatched data to be reported in new excel sheet with sas code.

 

Simple code will be highly appreciated.

 

Kind Regards,
Raju

Super User
Posts: 6,945

Re: comparing two excels

- import tables into SAS

- sort by identifying key variables

- in a data step, MERGE the two tables by key variables, using the in= dataset option to identify contributing tables

- specify a condition, using the variables from the in= options

 

PS don't post example data in MS Office files. Nobody in his right mind opens such from the web.

Use a data step with data in a cards; block.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Ask a Question
Discussion stats
  • 1 reply
  • 338 views
  • 0 likes
  • 2 in conversation