Automatic sheets from list with content

mvmonster

New Member
Joined
Feb 8, 2022
Messages
2
Office Version
  1. 365
Platform
  1. Windows
Dears members.

I am from Belgium and my English is not fantastic, but i wil try to explain my problem. ;)

I have on sheet 1 ( "Master") a list with numbers in colum A, in colum A to AB i have every cell filled with info.
Sheet 2 ( "Checklist") i have a template .
So, i try this vba code i find here on the site.
What i want to do :
- make sheet from every number in sheet 1 colum A
- make hyperlink from every number in sheet 1 colum A
- copy template in every maked sheet

So far so good with this code, but ...

- i can not copy the info in Sheet 1 (Range A to AB ) in every maked sheet
- I can not make my colum autosized ( every cell is diferent )
- I can not make a security, if the sheet already excist , he do not make a new sheet or overide it.

This is de code at this moment :

Option Explicit
Sub CreateAndNameWorksheets()
Dim c As Range
Application.ScreenUpdating = False
Sheets("Master").Select
For Each c In Sheets("Master").Range("A2:A" & Sheets("Master").Range("A" & Rows.Count).End(xlUp).Row)
c.Select
Sheets.Add After:=Sheets(Sheets.Count)
Sheets(Sheets.Count).Name = c.Value

Sheets("Checklist").Cells.Copy
ActiveSheet.Paste
Range("A10").Select
Application.CutCopyMode = False

'maken van Hyperlink in Master

Sheets("Master").Select
ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:="", SubAddress:=c.Value & "!A2", TextToDisplay:=c.Value
Next c
Application.ScreenUpdating = True



End Sub


Can somebody help me out ?

Thx !!

regards, Phil
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
Dears members,

one more thing. In the first row of sheet "Master" they are headers that i also want to copy each time a sheet is make.
thx !
 
Upvote 0

Forum statistics

Threads
1,214,824
Messages
6,121,784
Members
449,049
Latest member
greyangel23

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