For Next Faster

dannie

New Member
Joined
Dec 29, 2014
Messages
30
Hello,

I am using the below code. Is there is a way to have this go faster? Or some way for as soon as it finds the correct cell, to go to next? I am searching through about 1600 cells and 1600 cell2s. I am still new to VBA, any help would be greatly appreciated.

For Each cell In mgrrng
For Each cell2 In planrng
If cell = cell2 Then
cell.Offset(0, 128) = cell2.Offset(0, 2)
End If
Next
Next


Thank you,
D
 

Some videos you may like

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.

RoryA

MrExcel MVP, Moderator
Joined
May 2, 2008
Messages
34,966
Office Version
365, 2019, 2016, 2010
Platform
Windows, MacOS
Add Exit For before the End If line.
 

Watch MrExcel Video

Forum statistics

Threads
1,099,086
Messages
5,466,545
Members
406,486
Latest member
varmehta

This Week's Hot Topics

Top