Hello.

I need to compare two string and find out the number of characters by which they differ. The strings will be of identical length. The code should be as fast as possible as I will have to compare tens of thousands of strings. Let's say the string will be in a sheet in column A. The output could be probably a matrix in a csv format.

I'm still a beginner to VBA. This is how I would approach it.
1. Read the strings into a list/array
2. Iterate over the strings and compare string i to j.
3. To get the number of different characters I would probably split both strings into single letters and compare the letters at each position separately.

I wonder whether there is a more elegant/faster way to do it.

Thanks for any advice in advance.
Peter