Here's code that creates a report in your wanted format:
%let repdate=%sysfunc(inputn(2020-12-08,yymmdd10.));
%let curweek=%sysfunc(week(&repdate.));
%let nweek=%eval(&curweek. + 1);
proc format;
value wday
2 = "Monday"
3 = "Tuesday"
4 = "Wednesday"
5 = "Thursday"
6 = "Friday"
;
value weeklabel
&curweek. = "Current Week"
&nweek. = "Next Week"
;
run;
data pre;
set have;
where intnx('week',&repdate,0,'b') le sending_date le intnx('week',&repdate.,1,'e');
week = week(sending_date);
weekday = weekday(sending_date);
run;
proc report data=pre;
column ("Title" title) (week,(weekday,sending_date)) n;
define title / "" group;
define week / "" across format=weeklabel.;
define weekday / "" across format=wday. preloadfmt order=data;
define sending_date / "" display;
define n / noprint;
run;
If you wrap that into ODS EXCEL, you get your spreadsheet.
Current Week
Next Week
Title
Monday
Tuesday
Wednesday
Thursday
Friday
Monday
Tuesday
Wednesday
Thursday
Friday
a
.
.
.
.
2020-12-11
.
.
.
.
.
c
.
2020-12-08
.
.
.
.
.
.
.
.
d
.
.
.
.
.
.
.
.
.
2020-12-18
e
.
.
.
.
2020-12-11
.
.
.
.
.
g
.
.
.
.
.
2020-12-14
.
.
.
.
... View more