Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi Samuel,
Try: Dim sStr As String sStr = ActiveSheet.Cells(r, c).Value If Left(sStr, 3) = "USA" Then 'Do something End If --- Regards, Norman "Samuel" wrote in message oups.com... I need to act upon the test "USA" found in the first three chars of a cell. This is what I did, but I get a compile error.. So I did something wrong. How do I copare against specifc characters? Even better, can I use regular expressions? str = ActiveSheet.Cells(r, c) check = substr(str, 1, 3) If (check = "USA") Then ' do something End If |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
unhide menu bar in excel - just disappeared | Setting up and Configuration of Excel | |||
Excel User Conference - Last days for regular registration - Mar 15th | Excel Discussion (Misc queries) | |||
Excel User Conference - Last days for regular registration - Mar 15th | Excel Worksheet Functions | |||
opening csv file in regular excel format | Excel Discussion (Misc queries) | |||
Opening two separate instances of Excel | Excel Discussion (Misc queries) |