Issue with End of Statement - VBA Excel

jmryan267 1 Reputation point
2021-11-30T16:42:21+00:00

I have the following code - it is giving me "Expected: end of statement" . Can someone please help clarify what I am missing?

Sub If_And_ElseIf()

'Retrieves incentive baseline for corp mgr 1

Dim TeamHire As Integer
Dim InstalltoGoal As Integer
Dim Baseline As Integer

TeamHire = Range("B3").Value
InstalltoGoal = Range("B7").Value
Baseline = Range("C12").Value

'Line 1 of Pay Matrix

If TeamHire < Range("I5").Value And InstalltoGoal < Range("K2").Value Then Baseline = 0 _
    ElseIf TeamHire < Range("I5").Value And InstalltoGoal >= Range ("K2").Value And < Range("L2").Value Then Baseline = 400 _
    ElseIf TeamHire < Range("I5").Value And InstalltoGoal >= Range ("L2").Value And < Range("M2").Value Then Baseline = 600 _
    ElseIf TeamHire < Range("I5").Value And InstalltoGoal >= Range ("M2").Value And < Range "N2").Value Then Baseline = 800 _
    ElseIf TeamHire < Range("I5").Value And InstalltoGoal >= Range ("N2").Value And < Range("O2").Value Then Baseline = 920 _
    Else TeamHire < Range("I5").Value And InstalltoGoal >= Range ("O2").Value Then Baseline = 1040 _
End If
Office Development
Office Development
Office: A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.Development: The process of researching, productizing, and refining new or existing technologies.
3,294 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. jmryan267 1 Reputation point
    2021-11-30T17:05:18.05+00:00

    Disregard I figured out all of the mistakes I was making.

    0 comments No comments