Jan 18 2024 04:55 PM
Hi - trying to combine some functions to produce a result. Having no luck. Attached is a spreadsheet.
I need to determine if a Pain Score at either a Screening Visit or a Baseline Visit is an eligible score. The score must be between 40 and 80 and must have occurred at the Screening Visit or the Baseline Visit. It's either Eligible (40<=PAIN SCORE<=80) or it's Ineligible.
However, there are other visits too where these Pain Scores are obtained. Those should be Not Applicable because they have nothing to do with eligibility.
I feel like I'm entering the right formula, but I get errors - either too many arguments or missing parenthesis.
Here is the formula I'm trying (A = Visit Name and B = Pain Score): '=IF(OR(A1="Screening",A1="Baseline"),AND(B1>39,B1<81),"Eligible",if(and(B1<40,B1>80),"Not eligible","Not applicable"))
Any guidance for me?
Many thanks!
Nancy
Jan 18 2024 05:37 PM
Solution@nmlynch
Here's the formula:
=IF(OR(B26="Screening", B26="Baseline"), IF(AND(C26>=40, C26<=80), "Eligible", "Not Eligible"), "Not Applicable")
Jan 21 2024 03:32 PM
Jan 21 2024 03:34 PM
Jan 18 2024 05:37 PM
Solution@nmlynch
Here's the formula:
=IF(OR(B26="Screening", B26="Baseline"), IF(AND(C26>=40, C26<=80), "Eligible", "Not Eligible"), "Not Applicable")