excel vba - How to Avoid the Dreaded 'Select', 'Copy' & 'Paste' in this Example? -


this works, know 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 intended equivalent, results in method 'range' of object '_worksheet' failed:

eirpcases.columns("a:f") = eirplls.range(cells(1, revcol - 2), cells(lastrevrow, revcol + 3)).value 

this fails:

eirpcases.range(cells(1, 1), cells(lastrevrow, 6)) = eirplls.range(cells(1, revcol - 2), cells(lastrevrow, revcol + 3)).value 

what correct implementation?

i one:

with eirplls.cells(1, revcol - 2).resize(lastrevrow, 6)     eirpcases.range("a1").resize(.rows.count, .columns.count).value = .value end 

Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -