Copy pasting with only values

Lavina

Board Regular
Joined
Dec 18, 2018
Messages
75
Hello guys,

i am working on a project and i ran into a problem, i have no idea how to copy paste values when not using the paste function, how can i?

Current code:
With Sheets("main")
.Range(.Cells(4, 1), .Cells(lastrowMain, lastColumn)).Copy Sheets("Backup").Range("A" + CStr(lastrowBackup + 1))
End With
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
Hi & welcome to MrExcel.
Try
Code:
With Sheets("main")
Sheets("Backup").Range("A" & CStr(lastrowBackup + 1)).Resize(lastrowMain - 3, LastColumn).Value = .Range(.Cells(4, 1), .Cells(lastrowMain, LastColumn)).Value
End With
 
Upvote 0
Thank you for the reply!
I have already considered this solution, and even though it works, this way you don't really copy paste but transfer, i was hoping there was a solution using the copy method
 
Upvote 0
Since your code does not define what
lastrowMain, lastColumn

Is or what

.Range("A" + CStr(lastrowBackup + 1))

Is.

Here is a example of mine:

<strike>
</strike>
Sheets(1).Range("A1").Value = Sheets(2).Range("B1").Value

Does not require copy or paste.
 
Upvote 0
Thank you for the reply!
I have already considered this solution, and even though it works, this way you don't really copy paste but transfer, i was hoping there was a solution using the copy method

You want to copy but not paste?

I do not know how that could work
 
Upvote 0
The function already copies and pastes, logic goes: copy from - to.
But the only way i find to manipulate the copied range type is:
Selection.PasteSpecial Paste:=xlPasteValues
But in my situation i am an not using the paste function and I'm unable to find one for the copy function
 
Upvote 0
Thank you for the reply!
I have already considered this solution, and even though it works, this way you don't really copy paste but transfer, i was hoping there was a solution using the copy method
Why do you want to copy, if this works?
 
Upvote 0
Can you please explain exactly what you are trying to do, as it's not clear to me.
 
Upvote 0

Forum statistics

Threads
1,215,430
Messages
6,124,846
Members
449,194
Latest member
HellScout

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top