I finally figured it out! I just had to move my file statement out of the macro - otherwise I was just overwriting my first tab w/ the 2nd etc. (duh). Thanks for trying though!
ODS LISTING CLOSE;
Ods tagsets.ExcelXP style=XLsansPrinter
FILE = "&DIR.\XLS\20&CY. JH Auto Routine Edit Effectiveness Tracker A-L.xml";
%MACRO BYLCD(LCDDESC,ITERS,LCD);
Ods tagsets.ExcelXP style=XLsansPrinter options(sheet_name="&LCD." embedded_titles='yes' sheet_interval="none");
%DO I = 1 %TO &ITERS;
PROC REPORT DATA= HA_T1 NOWD SPLIT="!";
WHERE LCD_DESCRIPTION = "&LCDDESC." AND X = &I;
COLUMN EDIT ACTIVE_DATE QTR CLAIMS_REVIEWED CLAIMS_DENIED PCT_CLAIMS_DENIED
CHARGES_REVIEWED CHARGES_DENIED PCT_CHARGES_DENIED
Avg_Dol_Saved_per_Claim_Reviewed;
TITLE1 "&LCD. - &LCDDESC.";
TITLE4 'PART A';
DEFINE EDIT / 'EDIT' style(column)={tagattr='format:@' just=c};
DEFINE ACTIVE_DATE / style(column)={tagattr='format:@' just=c};
DEFINE QTR / style(column)={tagattr='format:@' just=c};
DEFINE CLAIMS_REVIEWED / style(column)={tagattr='#,##0' just=c};
DEFINE CLAIMS_DENIED / style(column)={tagattr='#,##0' just=c};
DEFINE PCT_CLAIMS_DENIED / style(column)={tagattr='##0.0%' just=c};
DEFINE CHARGES_REVIEWED / style(column)={tagattr='$#,##0.00' just=c};
DEFINE CHARGES_DENIED / style(column)={tagattr='$#,##0.00' just=c};
DEFINE PCT_CHARGES_DENIED / style(column)={tagattr='##0.0%' just=c};
DEFINE Avg_Dol_Saved_per_Claim_Reviewed / style(column)={tagattr='$#,##0.00' just=c};
run;
%END;
%mend BYLCD;
data _null_;
set /*ALLHLCDSAL*/ TEST;
BY LCD_DESCRIPTION;
call execute('%BYLCD('||LCD_DESCRIPTION||','||X||','||LCD||')');
run;
quit;
ODS tagsets.ExcelXP CLOSE;
ODS LISTING;
... View more