Hi ... but you did say "All variables are character variables" , yes/no?, and range is specific to numeric data. If they are character variables but the values are numerals, it will work, otherwise no. data x; input (race1-race5) (: $1.); datalines; 1 1 1 1 1 1 2 3 4 5 1 . 1 . 1 a b c d e ; run; data x; set x; same = ifc ( range(of r:) , 'different' , 'same'); run; race1 race2 race3 race4 race5 same 1 1 1 1 1 same 1 2 3 4 5 different 1 1 1 same a b c d e same Then there's the LOG messages ... the first NOTE is why it works with numerals. The others are why it does not work with other values. NOTE: Character values have been converted to numeric values at the places given by: (Line):(Column). 2360:24 NOTE: Invalid numeric data, race1='a' , at line 2360 column 24. NOTE: Invalid numeric data, race2='b' , at line 2360 column 24. NOTE: Invalid numeric data, race3='c' , at line 2360 column 24. NOTE: Invalid numeric data, race4='d' , at line 2360 column 24. NOTE: Invalid numeric data, race5='e' , at line 2360 column 24. race1=a race2=b race3=c race4=d race5=e same=same _ERROR_=1 _N_=4 NOTE: Missing values were generated as a result of performing an operation on missing values. Each place is given by: (Number of times) at (Line):(Column). 1 at 2360:14
... View more