I am seeking to determine the value differences between two strings. For example if I had the following two entries:
MicrosoftExcelRocks
MicrosoftExcelAlwaysRocksNow
I want to be able to pull only the difference between the two entries, which are the characters "AlwaysNow"
Does anyone know how to go about doing this?
Thanks for any help!
As you describe it, it would be a fairly simple macro; however, what if the entries are reversed? Would
MicrosoftExcelAlwaysRocksNow
MicrosoftExcelRocks
provide the same output, or would it be blank?
what would you expect from
abcabcxabc
xx
Pauley
The simplest method would be to go character by character and then track when they don't match. Something like (pseudo-code)
Pauleyi = j = 1 holdstr="" do if str(i) = str(j) then i=i+1 j=j+1 else holdstr=holdstr&str(i) i=i+1 endif until end of str1 or end of str 2
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks