I need help getting this code to work ... specifically the the
intersect portion ... vValue works ... getting this error message:
Method 'Intersect' of object '_Global' failed runtime error 1004
Dim iLastRow As Long
Dim vValue As Variant
Dim newMonthData As Workbook
Dim PrevMonth As Workbook
Set PrevMonth = Workbooks.Open("C:\Felix\ED501531.2889.xls", 3, , 2)
Set newMonthData = Workbooks.Open("c:\Felix\tempMonthData.xls", 3, , 2)
iLastRow = newMonthData.Sheets("tempMonthData").Range("A65536").End
(xlUp).Row
'vValue = Application.vLookup(newMonthData.Sheets("tempMonthData").Range
("A1"), PrevMonth.Sheets("ed501531.2889").Range("A1:CC5000"), 36, False)
Intersect([AX:AX], ActiveSheet.UsedRange).FormulaR1C1 = "=VLOOKUP
(tempmonthdata!RC1, " & PrevMonth.Worksheets("ed501531.2889").Range
("A:CC").Address(ReferenceStyle:=xlR1C1, External:=True) & ",36, FALSE)"
newMonthData.Close True
PrevMonth.Close True