Originally Posted by
parscon
Hi , I am using this VBA that check If column A is empty and if column I has data will copy them to column A and my code working very well just the problem is speed . i have about 830000 Row and it take so much time
is it possible to help me to make it faster
Thanks for your time and help
1. I think you're doing a lot of unnecessary looping
2. I don't think you need to test the value in column B since even if A and I are both blank, moving a blank to a blank does the same thing as testing
Option Explicit
Sub test()
Dim r As Range, c As Range
With ActiveSheet
On Error Resume Next
Set r = Intersect(.Columns(1).SpecialCells(xlCellTypeBlanks), .UsedRange)
For Each c In r.Cells
c.Value = c.Offset(0, 8).Value
Next
On Error GoTo 0
End With
End Sub