SAS provides a full-fledged modeling language in proc OPTMODEL. Since Excel's solver is designed for spreadsheet use, there is no equivalent macro in the SAS environment. However, modeling language are far more powerful than spreadsheet-based optimization. You can find more information about proc OPTMODEL in the documentation.