Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
String Functions
Which Operator do i use to compare text. eg if i want to use an "IF"
statement. To test for string that will reflect text written in any order |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
String Functions
John,
I think we need a bit more detail to address this. What does this mean? To test for string that will reflect text written in any order Mike "John" wrote: Which Operator do i use to compare text. eg if i want to use an "IF" statement. To test for string that will reflect text written in any order |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
String Functions
Not sure what you mean by this. Are you asking if the two text strings being
compared are composed of the same characters, just possibly in a different ordering? If so, there is no operator in VB that does what you want directly. Give this function a try... Function IsIdenticalCharacters(Text1 As String, Text2 As String) As Boolean Dim X As Long Dim Position As Long Dim TempText As String TempText = Text1 For X = 1 To Len(Text2) Position = InStr(TempText, Mid(Text2, X, 1)) If Position 0 Then Mid(TempText, Position, 1) = Chr$(1) Next IsIdenticalCharacters = TempText = String(Len(TempText), Chr$(1)) End Function Rick "John" wrote in message ... Which Operator do i use to compare text. eg if i want to use an "IF" statement. To test for string that will reflect text written in any order |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
help with string functions please | New Users to Excel | |||
String functions in VB macro | Excel Discussion (Misc queries) | |||
STRING functions | Excel Worksheet Functions | |||
help with string functions | Excel Programming | |||
Return two mid functions as one string. | Excel Programming |