Hi Rick,

The data setup you described sounds like a perfect one for dynamic data structure (a.k.a. hash table)

The following code handles all groups in one data step:

data Want2;
array types[-1:4] $ 7 _temporary_ ('' '' 'Min' 'Max' 'LowVal' 'HighVal') ; /* defined types */

if _N_ = 1 then /* set up hash table */
do;
if 0 then set Test;
declare hash H();
H.DefineKey('Type');
H.defineData('Value');
H.defineDone();
end;
H.clear();

/* for each group upload hash */
do until(last.Group=1);
set Test end = EOF;
by Group;
_IORC_ = H.add();
end;

/* in case of missing data extend the output */
do _N_ = 1 to 4;
Type = types[_N_];
Value = .;
_IORC_ = H.find();
if Value = . then _IORC_ = H.find(key:types[_N_-2]);
output;
end;

if EOF then stop;
keep Group Type Value;
run;
ods html;
proc print data=Want2;
var Group Type Value;
run;

All the best
Bart