vba pastespecial

J

joao

HI,

i am tring to copy data form one spreadsheet to another within the sam
workbook. i need to use the paste special, adding the values. I wrot
the folowwing code and it goes trough ok. it copies the information bu
it does not paste. and it does not show any problem.

anyone could help?

Thanks

Worksheets("dados").Cells(c, E).Select
Selection.Copy
x = c + 1
z = f + 2
Worksheets("Plan").Select
Cells(x, z).PasteSpecial Operation:=xlPasteSpecialOperationAd
 
T

Tom Ogilvy

c = 10
e = 5
f = 7
Worksheets("dados").Cells(c,e).Copy
Worksheets("Plan").Cells(c+1,f+2).PasteSpecial paste:=xlValues, _
Operation:=xlPasteSpecialOperationAdd
 
B

ben.c

hi
the pastespecial is not good in your exemple..
To have the value paste special, use PasteSpecial Paste:=xlValue
It should work..
But you can have found this just by record a value paste special on your sheet
 
Top