Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,069
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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
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
help with string functions please KRK New Users to Excel 4 June 29th 09 12:36 PM
String functions in VB macro Aerojade Excel Discussion (Misc queries) 6 October 3rd 08 02:36 PM
STRING functions anar_baku Excel Worksheet Functions 4 November 8th 05 05:05 PM
help with string functions margie[_6_] Excel Programming 2 February 25th 04 02:34 PM
Return two mid functions as one string. Keith Lorenzen Excel Programming 6 October 9th 03 02:46 PM


All times are GMT +1. The time now is 12:17 PM.

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

About Us

"It's about Microsoft Excel"