proc format; value $nrng(notsorted) 'L' = '1. L' 'M' = '2. M' ; run; proc format; value nrngN(notsorted) 1 = '1. single' 2 - high = '2 or more' ; run; data ff; input a $ b; if _N_>2 then c=_N_; datalines; L 3 M 1 L 2 M 1 L 1 run; ods html file='\\IRF01797\5666497$\ff.html'; proc tabulate data=ff noseps missing; title 'Example of proc tabulate'; class a b/ preloadfmt order=data; var c; table a='' all, b*c*sum*f=10.1/BOX='Example'; format a $nrng.; format b nrngN.; quit; ods html close;