LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default String Comparison using Like Problem

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

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Comparison of alphanumeric string ErExcel Excel Discussion (Misc queries) 4 May 7th 07 02:14 PM
String Comparison & Conditional Formatting Blobbies Excel Discussion (Misc queries) 3 April 18th 06 07:43 AM
comparison string VBA excell stats Excel Discussion (Misc queries) 5 March 16th 06 10:12 PM
String Comparison Purnima Excel Programming 9 March 8th 05 11:13 AM
VB String Comparison In Excel Craig[_8_] Excel Programming 2 November 24th 03 07:47 PM


All times are GMT +1. The time now is 09:44 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"