Hi
I have a workbook and run this macro first OK
Sub Split_Extract()
ActiveSheet.Name = "Extract"
Range("A1").Select
Cells.Find(What:="WFJ", After:=ActiveCell, LookIn:=xlFormulas, LookAt:= _
xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False _
, SearchFormat:=False).Activate
Range(Selection, ActiveCell.SpecialCells(xlLastCell)).Select
Selection.Cut
Range("H2").Select
ActiveSheet.Paste
Range("A1:E1").Select
Selection.Copy
Range("H1").Select
ActiveSheet.Paste
Application.CutCopyMode = False
End Sub
Once I done that I try to run a 2nd macro and this is when I get the issues. I get runtime error 1004 Method range of object global failed.
2nd Macro shown below. Any Ideas?
Range("F2").Select
ActiveCell.FormulaR1C1 = _
"=IF([@Source]="""","""",IF(ISNA(MATCH([@ID]&[@Field2]&[@Date]&[@Value],INDEX(R2C9:R104C9&R2C10:R104C10&R2C11:R104C11&R2C12:R104C12,),0)),""MISSING"",""""))"
Range("F2").Select
Selection.AutoFill Destination:=Range("Table2[Column1]") <---------------- when running debugger this is where line highlighted.
Range("Table2[Column1]").Select
End Sub
I have a workbook and run this macro first OK
Sub Split_Extract()
ActiveSheet.Name = "Extract"
Range("A1").Select
Cells.Find(What:="WFJ", After:=ActiveCell, LookIn:=xlFormulas, LookAt:= _
xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False _
, SearchFormat:=False).Activate
Range(Selection, ActiveCell.SpecialCells(xlLastCell)).Select
Selection.Cut
Range("H2").Select
ActiveSheet.Paste
Range("A1:E1").Select
Selection.Copy
Range("H1").Select
ActiveSheet.Paste
Application.CutCopyMode = False
End Sub
Once I done that I try to run a 2nd macro and this is when I get the issues. I get runtime error 1004 Method range of object global failed.
2nd Macro shown below. Any Ideas?
Range("F2").Select
ActiveCell.FormulaR1C1 = _
"=IF([@Source]="""","""",IF(ISNA(MATCH([@ID]&[@Field2]&[@Date]&[@Value],INDEX(R2C9:R104C9&R2C10:R104C10&R2C11:R104C11&R2C12:R104C12,),0)),""MISSING"",""""))"
Range("F2").Select
Selection.AutoFill Destination:=Range("Table2[Column1]") <---------------- when running debugger this is where line highlighted.
Range("Table2[Column1]").Select
End Sub