Hello,
I've list in my Master Sheet starts at cell B4. With below code, I can create multiple sheets and give different sheet names to them according to my list.
Now I want to get cell values of G13 from these copied sheets and paste these values to C4 in my master sheet . Which codes should I add for it?
thanks in advance.
I've list in my Master Sheet starts at cell B4. With below code, I can create multiple sheets and give different sheet names to them according to my list.
Now I want to get cell values of G13 from these copied sheets and paste these values to C4 in my master sheet . Which codes should I add for it?
thanks in advance.
Code:
Sub CreateAndNameWorksheets() Dim c As Range
Application.ScreenUpdating = False
For Each c In Sheets("Master").Range("B4:B" & Sheets("Master").Range("B" & Rows.Count).End(xlUp).Row)
Sheets("Template").Copy After:=Sheets(Sheets.Count)
With c
ActiveSheet.Name = .Value
ActiveSheet.Range("C7") = c.Value
.Parent.Hyperlinks.Add Anchor:=c, Address:="", SubAddress:= _
"'" & .Text & "'!A1", TextToDisplay:=.Text
End With
Next c
Application.ScreenUpdating = True
End Sub