Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Is there any wild card such as * that can be used in Case statement.
I have a VBA statement like For Each cell In Range("C1") Select Case cell.Value Case "ABoy" cell.Offset(0, 1).Value = 10 Case "A*" <----------------------------i.e. A and all other thing except A itself cell.Offset(0, 1).Value = 20 Case Else cell.Offset(0, 1).Value = 99 End Select Next Could someone please show me the right way to do it. Many Thanks |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
change data of entire column from small case to upper case | Excel Worksheet Functions | |||
How do I change from upper case to proper case in excel 2002 | Excel Discussion (Misc queries) | |||
Changing multiple cell text from lower case to upper case | Excel Discussion (Misc queries) | |||
Change the text from lower case to upper case in an Excel work boo | Excel Discussion (Misc queries) | |||
How to use formula auditing to change upper case to Title Case. | Excel Worksheet Functions |