PDA

View Full Version : Excel VBA macro to paste values



kihereko
08-11-2018, 02:30 PM
I have this VBA code
Sub copy()
Worksheets("home").range("E3").copy
Active sheet.paste destination:=worksheets("selections").cells(rows.count,"A").end(Xlup).offset(1,0)

End sub

What I want is help to make this same formula to copy and paste values only. The cells from which its copying have formulas so I want it to copy and paste values.("xlpatevalues").

Its a project I am working on to submit tomorrow and am new to VBA will appreciate your help.

"Home" is the sheet containing data
"Selections" is the sheet where I want to paste that data. Kind regards

kihereko
08-11-2018, 03:02 PM
TOO MANY VIEWS but no reply I solved it myself. #yes I can and I made it. Here is the code
Sub copy()
Worksheets("home").range("E3").copy
Active sheet.paste sheets("selections").cells(rows.count,"A").end(Xlup).offset(1,0).paste special xlpastevalues

End sub