Welcome to the SAS Communities.
With Excel everything is intermingled and you have just "stuff" in sheets. With SAS you need to distinguish between data (tables) and reports.
With SAS data is normally best organised in a long and narrow structure like you have it already. Most SAS procedures work best with such narrow data.
Procedures like Proc Tabulate and Proc Report allow you to then generate reports using such data.
Below sample code to illustrate what I'm talking about.
data have;
infile datalines dsd dlm=',' truncover;
input Date :ddmmyy10. Store :$50. Amount :dollar16.;
format date date9.;
datalines;
5/06/2023,Hobby Lobby,$103.86
9/06/2023,Haltom Thrift,$19.42
10/06/2023,Forever Young,$302.84
10/06/2023,Goodwill Arlington,$16.00
11/06/2023,Lowe's,$23.45
15/06/2023,Hobby Lobby,$29.18
24/06/2023,Michael's,$11.90
25/06/2023,Love It Again,$17.32
25/06/2023,Witherspoon's Antique,$32.48
27/06/2023,Rockler,$145.00
4/07/2023,JoAnne Fabrics,$10.00
4/07/2023,Uptown Cheapskate,$34.61
5/07/2023,Ace Hardware,$34.04
8/07/2023,Hobby Lobby,$34.54
14/07/2023,1/2 of 1/2,$388.69
15/07/2023,Goodwill Benbrook,$48.00
15/07/2023,Goodwill Campus,$29.50
15/07/2023,Hobby Lobby,$29.94
15/07/2023,JoAnne Fabrics,$72.60
15/07/2023,Target,$77.03
18/07/2023,Michael's,$84.89
29/07/2023,Hobby Lobby,$43.22
23/08/2023,The Container Store,$114.68
31/08/2023,Ace Hardware,$81.11
31/08/2023,Home Depot,$256.16
1/09/2023,Michael's,$56.98
2/09/2023,Michael's,$60.58
11/09/2023,Home Depot,$118.80
27/09/2023,Michael's,$140.64
30/09/2023,City of Weatherford,$30.00
7/10/2023,Goodwill Camp Bowie,$17.00
7/10/2023,Goodwill Campus,$3.58
30/10/2023,City of Weatherford,$30.00
1/11/2023,City of Weatherford,$30.00
4/11/2023,Goodwill Camp Bowie,$35.00
24/11/2023,Haltom Thrift,$28.09
1/12/2023,City of Weatherford,$30.00
;
/*ods excel file="c:\temp\my_excel.xlsx";*/
%let sv_missing=%sysfunc(getoption(missing,keyword));
options missing=' ';
proc tabulate data=have;
class store date;
var amount;
keylabel sum=' ';
table date=' ' all="Total",
store*amount=' '*f=dollar16.2
;
run;
options &sv_missing;
/*ods excel close;*/
... View more