I keep getting the " Else without if" error in VBA when I clearly do not have that issue. Does anyone know how to fix it? It takes me to the elseif statement that begins with elseif memb= "platinum" Below is my code:
ElseIf memb = "Platinum" Then d = 0.01
ElseIf memb = "Black" Then d = 0.03
End If
If st >= min Then cb = st * d Else cb = 0
End If
If cb >= thresh Then MsgBox ("cb is greater than thresh")
End If
tac = st + cb
Range("B5").Value = st
Range("B7").Value = cb
Range("B9").Value = tac
ElseIf, we probably can't help answer your question. (But if it says something likeIf something Then somethingthen you can't have anElseIfafter a "single-line"If. Just as you can't have anEnd Ifafter your later "single-line"Ifstatements such asIf st >= min Then cb = st * d Else cb = 0.