Are you looking for an Excel VBA Macro? Or a SAS Macro?
How is Excel involved here? Are you using SAS Add In for Office within Excel? Or just using terminology you're familiar with.
Regardless your full process is likely something of the sort, my assumptions of course:
1. Import data into SAS
2. Transpose/reformat
3. Export back to Excel
4. Repeat #1 for lots of sheets or files
If this is correct, your first step is to get it working for one iteration first without macros. Once you have that working, then you can move on to automation. You start by first determine what needs to change in each iteration, by doing it once or twice via copy/paste/change and identifying which parts need to be dynamic. Then you can start writing a macro.
If any of the above is accurate, please indicate where in this process you currently are working on and what specifically you're having issues with.
@dlinda wrote:
Thanks. I mean I need use macro to process many excel sheets. The data is large and I need transpose the data to do the next work.
... View more