Hi There
I got this macro from Mr Excel forum but I forgot who gave it to me. I have a bug on the line that says: If MyData(r, 1).HasFormula = True Then
The bug says "Object Required" Can someone fix this for me? Below is the macro
Sub CopyPaste1()
Application.ScreenUpdating = False
Dim i As Long, MyData As Variant
With Application
.ScreenUpdating = False
.Calculation = xlManual
End With
MyData = Range("AB9:AB" & Cells(Rows.Count, "AB").End(xlUp).Row)
For r = 9 To UBound(MyData)
If MyData(r, 1).HasFormula = True Then
ActiveCell.Select
Selection.Copy
ActiveCell.Offset(0, -49).Select
ActiveSheet.Paste
ActiveCell.Offset(0, 49).Select
End If
Next r
With Application
.ScreenUpdating = True
.Calculation = xlAutomatic
End With
I got this macro from Mr Excel forum but I forgot who gave it to me. I have a bug on the line that says: If MyData(r, 1).HasFormula = True Then
The bug says "Object Required" Can someone fix this for me? Below is the macro
Sub CopyPaste1()
Application.ScreenUpdating = False
Dim i As Long, MyData As Variant
With Application
.ScreenUpdating = False
.Calculation = xlManual
End With
MyData = Range("AB9:AB" & Cells(Rows.Count, "AB").End(xlUp).Row)
For r = 9 To UBound(MyData)
If MyData(r, 1).HasFormula = True Then
ActiveCell.Select
Selection.Copy
ActiveCell.Offset(0, -49).Select
ActiveSheet.Paste
ActiveCell.Offset(0, 49).Select
End If
Next r
With Application
.ScreenUpdating = True
.Calculation = xlAutomatic
End With