Say the link is a combination of the site name and page no that are based off of existing variables form and id. I have a macro that makes and outputs the link variable and I use the HYPERLINK function to embed the link into the display_link variable but have it print as the form name. I apologize that the code is a mess, I've tried so many things that they've jumbled into one. %macro link(lib, dat);
proc sql no print;
select near into :numvars
from dictionary.tables
where libmame="&LIB" and memname = "&DAT";
proc datasets library=&LIB;
modify &DAT;
%do i=1 %to &numvars.;
call symputx('form', put(form, $35.), 'G');
call symputx('id', put(pid, $5.), 'G');
Display_Link="=HYPERLINK(""https://&form.com/&id."", ""&form."")";
output;
%end;
run;
%mend;
%link(work, data);
ods tagsets.excelxp file=data.xls style=custonmjournal options(sheet_name='all IDs' row_repeat=1 ABSOLUTE_COLUMN_WIDTH = '10, 5' orientation='landscape frozen_headers='YES');
proc print data=data noobs label split'/'
style(column) = {fontsize=8pt}
style(header) = {fontsize=8py just=l};
var form id;
compute id;
urlstring= Display_Link;
call define(_col_, 'URL', urlstring);
endcomp;
run;
... View more