Paste Value and Link

mickyh

New Member
Joined
Jul 10, 2012
Messages
38
Office Version
  1. 365
Platform
  1. Windows
Good Morning.
I wonder if anyone can provide a solution, please. I would like to copy and paste values (which I can do) of selected sheets then link them to the original. pastelink doesn't work because I have a formula in the original cell.
any help greatly appreciated partial code below. :)
VBA Code:
  On Error Resume Next
 
    Worksheets("Imput Sheet").Range("A40").Copy
    Workbooks("JobList.xlsx").Activate ' Is the correct name Estimate List .xlsx or Estimate List 2012.xlsx ? Change this to Estimate List Proper Filename
If wbook Is Nothing Then
    Workbooks.Open FileName:=Environ("USERPROFILE") & "\Dropbox\SPSL Shared\Estimates 2021\JobList.xlsx" ' substitute for directory location of workbook and correct Filename
    Worksheets("JobList").Range("A" & Cells(Rows.Count, "A").End(xlUp).Row + 1).PasteSpecial Paste:=xlPasteValues
End If
    ThisWorkbook.Activate
    Worksheets("Imput Sheet").Range("B40:I40").Copy
    Workbooks("JobList.xlsx").Activate
    Worksheets("JobList").Range("A" & Cells(Rows.Count, "A").End(xlUp).Row).Offset(0, 2).PasteSpecial Paste:=xlPasteValues
    ThisWorkbook.Activate
    Worksheets("Imput Sheet").Range("E21:G21").Copy
    Workbooks("JobList.xlsx").Activate
    Worksheets("JobList").Range("A" & Cells(Rows.Count, "A").End(xlUp).Row).Offset(0, 10).Select
    Selection.PasteSpecial Paste:=xlPasteValues '
    ActiveWorkbook.Close savechanges:=True  '
    
    
    ThisWorkbook.Activate
    Application.CutCopyMode = False
    Range("C4").Select
    Application.ScreenUpdating = True

    
End Sub
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off

Forum statistics

Threads
1,214,885
Messages
6,122,085
Members
449,064
Latest member
MattDRT

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