Copy Only Value's Cell

lucashsoares

New Member
Joined
Mar 6, 2019
Messages
1
Hi there, I needed to copy the cell's value to another cell (in another sheet creating a list) whenever this same cell changed its value. I've created a simple code that works but it copies all things from this specific cell that I only want its content and this is causing me problems with references. Here it follows the code:

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$D$8" Then
Application.EnableEvents = False
Range("D8").Select
Selection.Copy
Sheets("Plan2").Select
Selection.Insert Shift:=xlDown
Sheets("Plan1").Select
Application.CutCopyMode = False
Application.EnableEvents = True
End If
End Sub

Any help is greatly appreciated.
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
replace
Code:
[COLOR=#333333]Selection.Insert Shift:=xlDown[/COLOR]
with
Code:
Selection.PasteSpecial xlPasteValues
If you need to insert and shift down then do it like this: first INSERT -> Then COPY -> Then PasteSpecial

and try to avoid selection when not needed for example:
Code:
Range("D8").Copy
 
Upvote 0

Forum statistics

Threads
1,223,900
Messages
6,175,276
Members
452,629
Latest member
SahilPolekar

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