Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
The code below is used in a search to find a row that matches a
person's name entered into a text box on a userform. I can't understand why my like comparison isn't working: Dim chkRequestor As String Dim FindRequestor As String Dim StrRequestor As String chkRequestor = Me.txtFindRequestor.Value StrRequestor = "*" & UCase(chkRequestor) & "*" Requestor = Range("c" & rowindex).Value FindRequestor = "*" & UCase(Requestor) & "*" If StrRequestor Like FindRequestor Then 'Do commands end if The strrequestor value I'm using is "*SHELLEY*" and the FindRequestor value is "*SHELLEY BOWMAN*"...why isn't this working??? Thanks, Shelley |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I forgot to add Dim Requestor as string, but it is already in my code.
Help is much appreciated!! Shelley |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Isn't your comparison backwards?
? "*SHELLEY BOWMAN*" like "*SHELLEY*" True works for me, but you are doing "*SHELLEY*" Like "*SHELLEY BOWMAN*" testing: ? "*SHELLEY*" Like "*SHELLEY BOWMAN*" False If you actually want to find Shelley Bowman in Shelley, then a false result would be correct. -- Regards, Tom Ogilvy "sbowman" wrote: I forgot to add Dim Requestor as string, but it is already in my code. Help is much appreciated!! Shelley |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thank You!!! Due to my overworked state, I am having "technical
difficulties" today :-) Shelley |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Comparison of alphanumeric string | Excel Discussion (Misc queries) | |||
String Comparison & Conditional Formatting | Excel Discussion (Misc queries) | |||
comparison string VBA excell | Excel Discussion (Misc queries) | |||
String Comparison | Excel Programming | |||
VB String Comparison In Excel | Excel Programming |