This works, but I know it is evil:
EIRPLLs.Select
Range(Cells(1, RevCol - 2), Cells(lastRevRow, RevCol + 3)).Copy
EIRPCases.Select
[A1:F1].Select
ActiveSheet.Paste
Selection.PasteSpecial Paste:=xlPasteValues
The below is intended to be equivalent, but results in Method ‘Range’ of object ‘_Worksheet’ failed:
EIRPCases.Columns("A:F") = EIRPLLs.Range(Cells(1, RevCol - 2), Cells(lastRevRow, RevCol + 3)).Value
This also fails:
EIRPCases.Range(Cells(1, 1), Cells(lastRevRow, 6)) = EIRPLLs.Range(Cells(1, RevCol - 2), Cells(lastRevRow, RevCol + 3)).Value
What is the correct implementation?
I would do this one:
With EIRPLLs.Cells(1, RevCol - 2).Resize(lastRevRow, 6)
EIRPCases.Range("A1").Resize(.Rows.Count, .Columns.Count).Value = .Value
End With
Tags: excel-vbaexcel, select, vba