 <p>By looking at your loops you don't seem that you are visiting any cell more than once. Wouldn't a simple if statement work here ?</p> <pre><code>if(Cells(i,j).Value = ',') Cells(i,j).Value = '.' Elsif(Cells(i,j).Value = '.') Cells(i,j).Value = ',') End </code></pre>