Stop calculation to copy data

LearnMeExcel

Well-known Member
Joined
Aug 11, 2009
Messages
728
Hi All
i have this code
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim LR As Long
If Target.Address = "$B$2" Then
    LR = Range("b" & Rows.Count).End(xlUp).Row
    Range("i3:i" & LR).Copy
    Range("g3:g" & LR).PasteSpecial xlPasteValues
End If
End Sub
then problem here
column i has formula changes when B2 changed
i want my code to copy column i before the values changes
becuse this code copy the data after b2 changed
how i can solve it
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).

PA HS Teacher

Well-known Member
Joined
Jul 17, 2004
Messages
2,838
Have you tried this?

<font face=Courier New><SPAN style="color:#00007F">Private</SPAN> <SPAN style="color:#00007F">Sub</SPAN> MyCode()<br>Application.Calculation = xlCalculationManual<br>   MsgBox "This does stuff."<br>Application.Calculation = xlCalculationAutomatic<br><SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">Sub</SPAN></FONT>
 

Watch MrExcel Video

Forum statistics

Threads
1,130,309
Messages
5,641,448
Members
417,209
Latest member
Agbarker

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
Top