I am not sure if it's entirely clear to me.
But what I understood, this is how it should be:
Dim input As String = "R|2"
Dim split As String() = input.Split(New [Char]() {"|"})
If split(0) = "A" Then
amount = split(1)
ElseIf split(0) = "R" Then
hours = split(1)
End If