Hi Guys,
I need to create multiple templates based on a cell value. To explain. I have a template, that has to be duplicated by the number of sites the person has (one template per site)
The number is entered in cell H2 - based on the number that is entered, that's the number of templates that needs to be generated automatically. This document will be used by anyone, and would have to accept that not everyone knows Excel.
I have tried the following, but that only creates one sheet based on manual intervention. I myself is not an Excel Guru (this has all been googled)
Sub Copyrenameworksheet()
Dim ws As Worksheet
Set Wh = Worksheets(ActiveSheet.Name)
ActiveSheet.Copy After:=Worksheets(Sheets.Count)
If Wh.Range("H2").Value <> "" Then
ActiveSheet.Name = Wh.Range("H2").Value
End If
Wh.Activate
Range("H2").Select
Selection.ClearContents
Wh.Range("H2").Activate
End Sub
Can anyone assist me?
I am desperate.
Bookmarks