 <p>Just guessing at what you're trying to do here....</p> <pre><code>Set range1 = wbk1.Worksheets(1).Range("R3:R20") 'are range 2 and 3 on the same row? Set range2 = wbk2.worksheets(2).Range("N" &amp; .Rows.Count).End(xlup).Offset(1,0) Set range3 = wbk2.worksheets(2).Range("O" &amp; .Rows.Count).End(xlup).Offset(1,0) For Each c in g.keys For Each d in range1.Cells If c = d Then range2.Value = d range3.value = d.Offset(0,-16) 'What now? Once one match has been found, ' any later matches will write to the same cells... End If Next d Next c </code></pre>