vonoventwin
Dec 15th, 2005, 10:02 AM
Is there any easier way so next time I don't have to write this??
Public Function Category(Pool)
'Custom Function to determine ANG functional categories
If Pool = "510" Then
Category = "Suffolk Environmental Payroll"
ElseIf Pool = "520" Then
Category = "Suffolk Security Police"
ElseIf Pool = "530" Then
Category = "Suffolk Fire Department"
ElseIf Pool = "550" Then
Category = "Suffolk State Regulars"
ElseIf Pool = "556" Then
Category = "Suffolk Real Property Manager"
ElseIf Pool = "555" Or Pool = "556" Then
Category = "Suffolk Hourly/Snow Workers"
ElseIf Pool = "512" Then
Category = "Stratton Environmental Payroll"
ElseIf Pool = "522" Then
Category = "Stratton Security Police"
ElseIf Pool = "532" Then
Category = "Stratton Fire Department"
ElseIf Pool = "560" Then
Category = "Stratton State Regulars"
ElseIf Pool = "567" Then
Category = "Stratton Real Property Manager"
ElseIf Pool = "564" Then
Category = "Stratton Hourly/Snow Workers"
ElseIf Pool = "514" Then
Category = "Niagara Environmental Payroll"
ElseIf Pool = "524" Then
Category = "Niagara Security Police"
ElseIf Pool = "570" Then
Category = "Niagara State Regulars"
ElseIf Pool = "576" Then
Category = "Niagara Real Property Manager"
ElseIf Pool = "574" Then
Category = "Niagara Hourly/Snow Workers"
ElseIf Pool = "516" Then
Category = "Syracuse Environmental Payroll"
ElseIf Pool = "526" Then
Category = "Syracuse Security Police"
ElseIf Pool = "534" Then
Category = "Syracuse Fire Department"
ElseIf Pool = "580" Then
Category = "Syracuse State Regulars"
ElseIf Pool = "586" Then
Category = "Syracuse Real Property Manager"
ElseIf Pool = "584" Or Pool = "585" Then
Category = "Syracuse Hourly/Snow Workers"
ElseIf Pool = "518" Then
Category = "Stewart Environmental Payroll"
ElseIf Pool = "528" Then
Category = "Stewart Security Police"
ElseIf Pool = "536" Then
Category = "Stewart Fire Department"
ElseIf Pool = "590" Then
Category = "Stewart State Regulars"
ElseIf Pool = "596" Then
Category = "Syracuse Real Property Manager"
ElseIf Pool = "594" Or Pool = "595" Then
Category = "Syracuse Hourly/Snow Workers"
Else
Category = "Undefined"
End If
End Function
Public Function Category(Pool)
'Custom Function to determine ANG functional categories
If Pool = "510" Then
Category = "Suffolk Environmental Payroll"
ElseIf Pool = "520" Then
Category = "Suffolk Security Police"
ElseIf Pool = "530" Then
Category = "Suffolk Fire Department"
ElseIf Pool = "550" Then
Category = "Suffolk State Regulars"
ElseIf Pool = "556" Then
Category = "Suffolk Real Property Manager"
ElseIf Pool = "555" Or Pool = "556" Then
Category = "Suffolk Hourly/Snow Workers"
ElseIf Pool = "512" Then
Category = "Stratton Environmental Payroll"
ElseIf Pool = "522" Then
Category = "Stratton Security Police"
ElseIf Pool = "532" Then
Category = "Stratton Fire Department"
ElseIf Pool = "560" Then
Category = "Stratton State Regulars"
ElseIf Pool = "567" Then
Category = "Stratton Real Property Manager"
ElseIf Pool = "564" Then
Category = "Stratton Hourly/Snow Workers"
ElseIf Pool = "514" Then
Category = "Niagara Environmental Payroll"
ElseIf Pool = "524" Then
Category = "Niagara Security Police"
ElseIf Pool = "570" Then
Category = "Niagara State Regulars"
ElseIf Pool = "576" Then
Category = "Niagara Real Property Manager"
ElseIf Pool = "574" Then
Category = "Niagara Hourly/Snow Workers"
ElseIf Pool = "516" Then
Category = "Syracuse Environmental Payroll"
ElseIf Pool = "526" Then
Category = "Syracuse Security Police"
ElseIf Pool = "534" Then
Category = "Syracuse Fire Department"
ElseIf Pool = "580" Then
Category = "Syracuse State Regulars"
ElseIf Pool = "586" Then
Category = "Syracuse Real Property Manager"
ElseIf Pool = "584" Or Pool = "585" Then
Category = "Syracuse Hourly/Snow Workers"
ElseIf Pool = "518" Then
Category = "Stewart Environmental Payroll"
ElseIf Pool = "528" Then
Category = "Stewart Security Police"
ElseIf Pool = "536" Then
Category = "Stewart Fire Department"
ElseIf Pool = "590" Then
Category = "Stewart State Regulars"
ElseIf Pool = "596" Then
Category = "Syracuse Real Property Manager"
ElseIf Pool = "594" Or Pool = "595" Then
Category = "Syracuse Hourly/Snow Workers"
Else
Category = "Undefined"
End If
End Function