Thank you Nick, this looks great.
Would you be able to tell me if I was right...is Diagnosis1 being
compared against Severity1 Severity2 Severity3 and Severity4...or just
Severity1? I just really need Diagnosis1 to match to Severity1,
Diagnosis2 to match to Severity2 etc...
Is that what is happening here?
Thank you again for the help.
Will Sankey

Yes. You will kick yourself.
forval j = 1/5 {
replace complex_severity=1 ///
if inlist(Diagnosis`j',"710","714","715","720","725","733")
& inrange(Severity`j', 2, .)
}
-inrange()- is another way to handle your second comparison. What you
had is fine; I just showed you another way.
Nick