View Single Post
  #12   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Harlan Grove
 
Posts: n/a
Default Convert text strings to a code or number

Pete_UK wrote...
I also think you need to be a bit more explicit about the nature of the
"Entity" and its "Intercompany". Your example just shows two 4
character names, but is this representative of what you will have in
reality? Could you, for example, have "ApplesPears" and "PearsApples",
or "PineappleGrapes" and "GrapesPineapple" - how would you know where
to split the combined strings?


You should quote or summarize relavant context.

If the OP's goal is just to check whether some simple swapping of
substrings in one string produces another string, e.g., AAAABBB - AAAA
BBB - BBB AAAA - BBBAAAA in which case AAAABBB and BBBAAAA are deemed
equivalent, then this could be done using built-in functions and
defined names. The name could be seq referring to

=ROW(INDEX(Sheet1!$1:$65536,1,1):INDEX(Sheet1!$1:$ 65536,1024,1))

and if the two strings were in A1 and A2, the formula would look like

=SUMPRODUCT(--(EXACT(MID(A1,seq,64)&LEFT(A1,seq-1),A2)))0