Thread: case
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Snake Plissken[_2_] Snake Plissken[_2_] is offline
external usenet poster
 
Posts: 75
Default case

what about this:

Sub qq()


Dim MyCheck As String

MyCheck = Cells(1, 3).Value

Cells(1, 3).Select

If MyCheck = "ABoy" Then

ActiveCell.Offset(0, 1).Value = 10

ElseIf MyCheck Like "A*" Then

ActiveCell.Offset(0, 1).Value = 20

Else

ActiveCell.Offset(0, 1).Value = 99

End If

End Sub