View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Lars-Åke Aspelin[_4_] Lars-Åke Aspelin[_4_] is offline
external usenet poster
 
Posts: 83
Default EXACT function - but where does it not match?

If you want the formula to work also when the two texts are of
different lenght you have to extend it a bit. Try this:

=MIN(IF(NOT(EXACT(MID(F1,ROW(INDIRECT("1:"&MAX(LEN (F1),LEN(G1)))),1),MID(G1,ROW(INDIRECT("1:"&MAX(LE N(F1),LEN(G1)))),1))),ROW(INDIRECT("1:"&MAX(LEN(F1 ),LEN(G1))))))

Note: This is an array formula that must be confirmed with
CTRL+SHIFT+ENTER rather than just ENTER.

Hope this helps / Lars-Åke

On Fri, 19 Mar 2010 10:39:01 -0700, ana
wrote:

No luck, it's showing a 0 when it doesn't match, it also forced a copy of the
cell that I have the array in, into the one below (really odd).

And I did use the parenthesis w/ the array.

"Bob Phillips" wrote:

Try this array formula

=MIN(IF(NOT(EXACT(MID(F1,ROW(INDIRECT("1:"&LEN(F1) )),1),MID(G1,ROW(INDIRECT("1:"&LEN(G1))),1))),ROW( INDIRECT("1:"&LEN(F1)))))

it will show 0 if the mtach exactly

--

HTH

Bob

"ana" wrote in message
...
I'm currently using the EXACT function to compare two groups of text.

Is there a macro I can write or function I can use where Excel can tell
me,
no it's not an exact match and highlight or format where the text starts
to
not match.

So it matches up until it gets to the 255th character, and maybe bolds in
red at the start of non-exact-match.

Please note I'm using Exact b/c the spacing, text, everything within the
cell must exactly match.



.