Awesome thanks! I believe that was the issue - I didn't define the year_add macro before the macro YEAR. My code now works! Thank you both! My working code now reads: %let align_status = 'ALIGNED'; /*%let align_status = 'NOT ALIGNED';*/ %let year_add = ; %MACRO YEAR; %if &align_status.= 'ALIGNED' %then %do; %let year_add = (2013); %end; %if &align_status. = 'NOT ALIGNED' %then %do; %let year_add = (2012, 2013); %end; %MEND YEAR; %YEAR; %put &align_status &year_add;
... View more