The macro is dynamic to generate multiple Excel files containing the frequency results for each unique BY-group. (e.g., Type). In this SAS example,  PROC SQL SELECT code is embedded inside a macro. The SELECT query processes the column (passed in the macro parameter) then create a macro variable with the number of unique (distinct) value… (0 comment)