snowdyce
11-08-2012, 11:32 AM
Hello everyone,
I have an If Statement that is giving me a Run-time error '13': Type Mismatch. Here is the code:
Dim CurrentSubGroup as String
Dim i, LastRow as Long
Do Until i = LastRow
CurrentSubGroup = ActiveSheet.Cells(i, 9).Value
If CurrentSubGroup = "Executives" Or "Global Mobility STA" Or "Salaried Exempt" Or "Salaried Non-Exempt" Or "Salaried Exempt OT" Then
End If
i=i+1
Loop
I haven't put the code that will execute if true. Mu example, the first Column populates CurrentSubGroup as "Salaried Expense" so it should pass through the If. The runtime error pops when it get to the if with all the Or's. Am I doing sometime wrong? Thanks :beerchug:
I have an If Statement that is giving me a Run-time error '13': Type Mismatch. Here is the code:
Dim CurrentSubGroup as String
Dim i, LastRow as Long
Do Until i = LastRow
CurrentSubGroup = ActiveSheet.Cells(i, 9).Value
If CurrentSubGroup = "Executives" Or "Global Mobility STA" Or "Salaried Exempt" Or "Salaried Non-Exempt" Or "Salaried Exempt OT" Then
End If
i=i+1
Loop
I haven't put the code that will execute if true. Mu example, the first Column populates CurrentSubGroup as "Salaried Expense" so it should pass through the If. The runtime error pops when it get to the if with all the Or's. Am I doing sometime wrong? Thanks :beerchug: