I'm not sure I fully understand your question, but below are a few things I've learned when sending SAS data to Excel named ranges. I'm not aware of a way to create named ranges using SAS (unless you can send over VBA code) SAS will only recognise simple named ranges (e.g. A1:D10), so dynamic ranges, e.g. using the OFFSET or INDIRECT functions, are not recognised. If you replace data in a named range with a larger range of data, then the named range will automatically increase. You can't replace data in Excel without deleting it first (as in your code), but did you know you can use MODIFY in a data step to update existing Excel values with those in a data set? You can also append new rows to the Excel data using PROC DATASETS, without needing to delete the Excel data first.
... View more