Copy Destination:= is pasting formulas instead of values

jameslec

New Member
Joined
Jun 21, 2013
Messages
10
I fell like this is an easy answer. I am copying cells from 1 worksheet to another if a condition is met. My code is working but it is pasting the formulas from the cell instead of the value of the cell. How can I modify this code to paste the values?

Private Sub Worksheet_Change(ByVal Target As Range)


Dim rngCheck As Range
Dim CheckCell As Range
Dim lRow As Long


Set rngCheck = Intersect(Me.Columns("BJ"), Target)


If Not rngCheck Is Nothing Then
For Each CheckCell In rngCheck.Cells
If CheckCell.Value = "Y" Then
With Sheets("Event Log")
lRow = .Cells(.Rows.Count, "A").End(xlUp).Row + 1
Me.Cells(CheckCell.Row, "A").Copy Destination:=.Cells(lRow, "A")
Me.Cells(CheckCell.Row, "BA").Copy Destination:=.Cells(lRow, "B")
Me.Cells(CheckCell.Row, "BH").Copy Destination:=.Cells(lRow, "E")
Me.Cells(CheckCell.Row, "BB").Copy Destination:=.Cells(lRow, "F")
End With
End If
Next CheckCell
End If


End Sub
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.

Forum statistics

Threads
1,215,655
Messages
6,126,053
Members
449,283
Latest member
GeisonGDC

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