akaballa123
Technical User
Hi,
I wrote the following code to highlight cells in one workbook fi the corresponding cells in another workbook are highlighted. I get a global 'out of range' method error for the following line: Range(Cells(y, "E")).Select
Set rRange = Range(Cells(x, "N"), Cells(x, "AD"))
For Each rCell In rRange
If rCell.Value <> "" Then
rCell.Select
Selection.Copy
Windows("projectExcelSheet.xls").Activate
For y = 5 To 107
If Application.Workbooks("PM Assignments April 28 Q4 GROW discussions.xls").Worksheets("Sheet1").Cells(x, "N") = rCell.Value Then
Windows("projectExcelSheet.xls").Activate
Range(Cells(y, "E")).Select ' this is where I get the error
Selection.Paste
End If
Next y
End If
Next rCell
Next x
I wrote the following code to highlight cells in one workbook fi the corresponding cells in another workbook are highlighted. I get a global 'out of range' method error for the following line: Range(Cells(y, "E")).Select
Set rRange = Range(Cells(x, "N"), Cells(x, "AD"))
For Each rCell In rRange
If rCell.Value <> "" Then
rCell.Select
Selection.Copy
Windows("projectExcelSheet.xls").Activate
For y = 5 To 107
If Application.Workbooks("PM Assignments April 28 Q4 GROW discussions.xls").Worksheets("Sheet1").Cells(x, "N") = rCell.Value Then
Windows("projectExcelSheet.xls").Activate
Range(Cells(y, "E")).Select ' this is where I get the error
Selection.Paste
End If
Next y
End If
Next rCell
Next x