if statment

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

If Gender = "F" And Age = "60-64" And Chair_Stand >= "21" Then
Chairstandresult = "95%"
ElseIf Gender = "F" And Age = "60-64" And Chair_Stand <= "20" And
Chair_Stand >= "19" Then Chairstandresult = "90%"
End If



what's wrong about this if statment I get msg that said that it's missing
the end if
 
You've ended one of the IFs (the ELSEIF), now you need an EndIf for the
opening IF statement. So you need to have 2 EndIfs in a row to close the
statement.
 
Try this:

If Gender = "F" And Age = "60-64" And Chair_Stand >= "21" Then
Chairstandresult = "95%"
ElseIf Gender = "F" And Age = "60-64" And Chair_Stand <= "20" And
Chair_Stand >= "19" Then
Chairstandresult = "90%"
End If

Steve
 
Back
Top