I assume x is the number I'm going to analyze and "y" is as "male" or "female" and "z" is as age group.
x는 결과가 "저체중", "과체중"또는 "과체중"이되는 숫자입니다. 실제로 BPI 인 x는 남성과 여성에게 동일하지 않습니다. X = (21)는 다음 성별과 연령에 의존하는 경우 예를 들어, 그것은으로 분류 할 것 중 하나 "underweigh" ","건강한 "또는 과체중.Excel, 함수 if,
Function BAI(x As Integer, y As String, z As Integer) As String
If x < 21 And y = "female" And 20 <= z <= 39 Then
BAI = "UNDERWEIGHT"
Elseif 22 <= x <= 33 And y = "Female" And 20 <= z <= 39 Then
BAI = "Healthy"
ElseIf 34 <= x <= 38 And y = "Female" And 20 <= z <= 39 Then
BAI = "overweight"
ElseIf x >= 39 And y = "Female" And 20 <= z <= 39 Then
BAI = "OBESE"
ElseIf x <= 23 And y = "female" And 40 <= z <= 59 Then
BAI = "UNDERWEIGHT"
ElseIf 24 <= x <= 35 And y = "female" And 40 <= z <= 59 Then
BAI = "Healthy"
ElseIf 36 <= x <= 41 And y = "female" And 40 <= z <= 59 Then
BAI = "Overweight"
ElseIf x >= 42 And y = "female" And 40 <= z <= 59 Then
BAI = "OBESE"
ElseIf x <= 25 And y = "female" And 60 <= z <= 79 Then
BAI = "UNDERWEIGHT"
ElseIf 26 <= x <= 38 And y = "female" And 60 <= z <= 79 Then
BAI = "Healthy"
ElseIf 39 <= x <= 43 And y = "female" And 60 <= z <= 79 Then
BAI = "Overweight"
ElseIf x >= 44 And y = "female" And 60 <= z <= 79 Then
BAI = "obese"
ElseIf x <= 8 And y = "male" And 20 <= z <= 39 Then
BAI = "Underweight"
ElseIf 9 <= x <= 21 And y = "male" And 20 <= z <= 39 Then
BAI = "Healthy"
ElseIf 22 <= x <= 26 And y = "male" And 20 <= z <= 39 Then
BAI = "overweight"
ElseIf x >= 27 And y = "male" And 20 <= z <= 39 Then
BAI = "OBESE"
ElseIf x <= 11 And y = "male" And 40 <= z <= 59 Then
BAI = "UNDERWEIGHT"
ElseIf 12 <= x <= 23 And y = "male" And 40 <= z <= 59 Then
BAI = "Healthy"
ElseIf 24 <= x <= 28 And y = "male" And 40 <= z <= 59 Then
BAI = "Overweight"
ElseIf x >= 29 And y = "male" And 40 <= z <= 59 Then
BAI = "OBESE"
ElseIf x <= 13 And y = "male" And 60 <= z <= 79 Then
BAI = "UNDERWEIGHT"
ElseIf 14 <= x <= 25 And y = "male" And 60 <= z <= 79 Then
BAI = "Healthy"
ElseIf 26 <= x <= 30 And y = "male" And 60 <= z <= 79 Then
BAI = "Overweight"
End If
End Function
[How to Ask] (http : // stackoverflow. co.kr/help/how-to-ask)를 읽고 그에 맞게 질문을 수정하고 더 읽기 쉽도록하십시오. 질문은 작성된 형식으로 닫힐 가능성이 매우 높습니다. –
이미 시도한 것을 잘 기입하십시오. 입력 한 내용과 반환 할 내용을 잘 표시하십시오. – thatsIch
힌트로, 예제가 없으면 IF() 및 VLOOKUP()이 작동 할 것을 제안합니다. –