SOLVED

If statement help needed

Brass Contributor

Capture.JPG

 

I am trying to write a formula for above table. 

there are 3 conditions. IF ( 20 < "age cell" < 39 AND "gender cell" = "female" AND BAI < %21  THEN RESULTS = UNDERWEIGHT)

And so on. 

If i get help with first line I can write the rest. thank you

6 Replies

Hi @msm66,

This is one approach. 

=IF(AND(A2>20,A2<39,B2="Female",C2<21)=TRUE,"Underweight","something else")

Bennadeau_0-1593640463134.png

Have fun with that.

 

Ben

 

best response confirmed by msm66 (Brass Contributor)
Solution

@msm66 Please see attached workbook. I combined the check for both men and women and all age ranges and BAI range in one formula so it looks a bit long but captures every scenario you described.

BAIassessment.png

Thank you very much Ben that was extremely helpful.
hynguyen,
Thank you very much for taking your time and writing the whole code. I was amazed. That was genius.
There Is only one problem. How you were able to save it as .xlsx? it is giving me a hard time that because of macro I need to save it s .xlms
I was wondering how you were able to save it in xlsx format? thanks again

@msm66 My Excel default is .xlsx. You can simply Save As it and choose .xlsm (or .xlsb) - both work for macro. Or just right click on the Tab "Sheet1" then choose Move or Copy... and Move the selected sheet to your xlsm workbook

1 best response

Accepted Solutions
best response confirmed by msm66 (Brass Contributor)
Solution

@msm66 Please see attached workbook. I combined the check for both men and women and all age ranges and BAI range in one formula so it looks a bit long but captures every scenario you described.

BAIassessment.png

View solution in original post