Copy and paste link cell vba

hattricktwenty

New Member
Joined
Aug 2, 2021
Messages
3
Office Version
  1. 2011
Platform
  1. MacOS
The plan is to create a copy of sheet 2 to new sheet then take data from the new sheet to sheet 1, the data from the new sheet is automatically updated witch in turn can be seen on sheet 1. I am stuck on how to copy paste a link or create a live link to the next available cell on sheet 1
Here is the code I have so far

sheet_name_to_create = Worksheets("New Recipe").Range("b2")
For rep = 1 To (Worksheets.Count)
If Sheets(rep).Name = sheet_name_to_create Then
MsgBox "This sheet already exists!"
Exit Sub
End If
Next

Sheets.Add after:=Worksheets("New Sheet Name")
ActiveSheet.Name = sheet_name_to_create
Worksheets("Sheet 2").Range("A1:aa999").Copy
ActiveSheet.Range("A1").PasteSpecial Paste:=xlPasteAll
ActiveSheet.Range("A1").PasteSpecial Paste:=xlPasteColumnWidths
ActiveSheet.Range("A1").PasteSpecial Paste:=xlPasteFormulasAndNumberFormats
ActiveSheet.Range("A1").PasteSpecial Paste:=xlPasteFormats
Range("P5:V5").Copy
Sheets("Sheet 1").Range("A" & Rows.Count).End(xlUp).Offset(1, 0).Paste link:=True
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.

Forum statistics

Threads
1,214,950
Messages
6,122,438
Members
449,083
Latest member
Ava19

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