santoshloka
Board Regular
- Joined
- Aug 31, 2017
- Messages
- 125
i need help with macro
i have made a code to create new sheet with help of cells reference ("E2:AG2") there are around 20 sheets which are going to generate by macro(when the sheets are created they must link to Abstract sheet)
There is a issue with making sheets
when the new sheet created it must link with particulat cell to get the cell value in Abstract sheet.
if you look at "Abstract" sheet(cell formula it is linked to "11M") sheet, as well evrey "new sheet("E2:AG2") must be linked to
='11M'!$I$65=E6
=22+770M'!$I$65=G6
when i click command command new sheets are genereated by code as well as formula also must link to abstract sheet.
Hers is the attachment
https://drive.google.com/open?id=0B8-usD7SI_4aQVRUaV91WEI2cHc
i have made a code to create new sheet with help of cells reference ("E2:AG2") there are around 20 sheets which are going to generate by macro(when the sheets are created they must link to Abstract sheet)
There is a issue with making sheets
when the new sheet created it must link with particulat cell to get the cell value in Abstract sheet.
if you look at "Abstract" sheet(cell formula it is linked to "11M") sheet, as well evrey "new sheet("E2:AG2") must be linked to
='11M'!$I$65=E6
=22+770M'!$I$65=G6
when i click command command new sheets are genereated by code as well as formula also must link to abstract sheet.
Code:
Sub CreateSheetsFromAList()
Dim MyCell As Range, MyRange As Range
Set MyRange = Sheets("Abstract").Range("E2:AG2")
For Each MyCell In MyRange
Sheets.Add After:=Sheets(Sheets.Count) 'creates a new worksheet
Sheets(Sheets.Count).Name = MyCell.Value ' renames the new worksheet
Next MyCell
End Sub
https://drive.google.com/open?id=0B8-usD7SI_4aQVRUaV91WEI2cHc
Last edited: