Hi @Reeza, i trust you are well. Thank you for the swift response to my question. I thought it would be befitting to share what i have learned such that other individuals new to SAS can benefit =). I have learned the following wrt macros: It is a code generator which can be used to make repetitive coding more efficient. Below are the steps i took to code a macro: Step 1 Hard code the SAS program you are keen to make efficient with a macro. Step 2 Ensure the code in step 1 runs correctly. Step 3 Add a macro %macro Step 4 Name your macro %macro MyFirstMacro; Step 5 End the macro %mend; Step 6 Place code from step 1 between %macro MyfirstMacro; and %mend; %macro MyFirstMacro; insert Code From Step 1 Here. %mend MyFirstMacro; Step 7 Run Step 6. SAS will not output any result yet. Step 8 Call the assigned macro by it`s name. %let MyFirstMacro; Step 9 Add Variable (s). %let MyFirstMacro (variable 1); %let MyFirstMacro (variable 2); Step 10 Add placeholder where the called macro will look in; to generate code. %macro MyFirstMacro (general descriptor name given to describe variable 1 & variable 2); . Step 11 Add ampersand (&) where applicable to the code in step 1 which have been inserted between %macro MyFirstMacro; AND %mend; Step 12 Add a second full stop to end the macro. You can have to full stops next to each other like this .. Macro looks like this: %macro MyFirstMacro (month); Title "Q2"; proc import out =Months_Q2 Datafile= "\\string\&month..xls" DBMS= Excel2010 replace; Sheet='Sheet1'; GETNAMES=YES; MIXED=NO; run; %mend MyFirstMacro ; %MyFirstMacro (Variable1); %MyFirstMacro (Variable2); Hope this helps. Regards, New_2_this
... View more