Paste Value and Link

mickyh

New Member
Joined
Jul 10, 2012
Messages
12
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
 

Some videos you may like

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.

Watch MrExcel Video

Forum statistics

Threads
1,128,088
Messages
5,628,599
Members
416,327
Latest member
Chimay

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