Hi all,
I'm trying to write an formula for an audit. The questions is, if a patient is on a particular drug 'A', are certain numbers within a certain range - for instance
if they are on drug A, and they are over 80, or a serum creatinine of over 133, or a weight of under 60kg, or a creatinine clearance in the rnage 15-29mmol, then they need to have had a blood test within a certain period of time (6 months). I'm struggling with how to write it without getting an error!
my current approach is =IF(D25="A" AND(OR(L25>133,N25<60,E25>=80,(W25<=29,W25>=15)), "Y", "N") but that gets an error
A previous formula which includes the other drugs 'R' and 'D' with their particular criteria looks like this
=IF(AND(H27="R",W27<=50,W27>=14),"Y",IF(AND(H27="A",W27<=30,W27>14)*(OR(E27>=79))*(OR(L27>=132))*(OR(N27<=61)),"Y",IF(AND(H27="D",W27>=29,W27<=51),"Y","N")))
I think that is working but doesn't include the extra criteria outlined above.
Would appreciate any help
I'm trying to write an formula for an audit. The questions is, if a patient is on a particular drug 'A', are certain numbers within a certain range - for instance
if they are on drug A, and they are over 80, or a serum creatinine of over 133, or a weight of under 60kg, or a creatinine clearance in the rnage 15-29mmol, then they need to have had a blood test within a certain period of time (6 months). I'm struggling with how to write it without getting an error!
my current approach is =IF(D25="A" AND(OR(L25>133,N25<60,E25>=80,(W25<=29,W25>=15)), "Y", "N") but that gets an error
A previous formula which includes the other drugs 'R' and 'D' with their particular criteria looks like this
=IF(AND(H27="R",W27<=50,W27>=14),"Y",IF(AND(H27="A",W27<=30,W27>14)*(OR(E27>=79))*(OR(L27>=132))*(OR(N27<=61)),"Y",IF(AND(H27="D",W27>=29,W27<=51),"Y","N")))
I think that is working but doesn't include the extra criteria outlined above.
Would appreciate any help