Code:
Function ShowPayPeriod(PayPeriod)
Tier1 = 240
Tier2 = 52
Tier3 = 26
Tier4 = 24
Tier5 = 12
Tier6 = 10
Tier7 = 13
Tier8 = 22
Tier9 = 53
Tier10 = 27
Select Case PayPeriod
Case "Daily"
ShowPayPeriod = 1 * Tier1
Case "Weekly"
ShowPayPeriod = 1 * Tier2
Case "Biweekly"
ShowPayPeriod = 1 * Tier3
Case "Semi - monthly"
ShowPayPeriod = 1 * Tier4
Case "Monthly"
ShowPayPeriod = 1 * Tier5
Case "Other 10"
ShowPayPeriod = 1 * Tier6
Case "Other 13"
ShowPayPeriod = 1 * Tier7
Case "Other 22"
ShowPayPeriod = 1 * Tier8
Case "Weekly 53"
ShowPayPeriod = 1 * Tier9
Case "Biweekly 27"
ShowPayPeriod = 1 * Tier10
End Select
End Function
I'm getting "variable not defined" highlighting Tier1
or I'm getting the macro prompt screen as if i selected Alt+F8
One of these errors appear when I try to run this... I enter =ShowPayPeriod(B3) in any cell and the error comes up.
What am I missing?
Thanks
-- g