Hey everyone,
I've created and named a sheet based on a list in another sheet. Which works great:
Dim WB As Workbook
Set WB = Workbooks("Workbook")
Dim List As Worksheet
Set List = WB.Sheets("Sheet1")
Dim r As Integer
Dim Last_Row As Integer
Last_Row = Application.WorksheetFunction.CountA(List.Range("A:A"))
'Start Loop
For r = 2 To Last_Row
WB.Sheets.Add
WB.ActiveSheet.Name = List.Range("A" & r).Value & "AE"
Dim AES As Worksheet
Set AES = WB.Sheets(List.Range("A" & r).Value & "AE")
The problem I have is now referencing the sheet in a formula (vlookup/countif etc)
Can anyone help please?
I've created and named a sheet based on a list in another sheet. Which works great:
Dim WB As Workbook
Set WB = Workbooks("Workbook")
Dim List As Worksheet
Set List = WB.Sheets("Sheet1")
Dim r As Integer
Dim Last_Row As Integer
Last_Row = Application.WorksheetFunction.CountA(List.Range("A:A"))
'Start Loop
For r = 2 To Last_Row
WB.Sheets.Add
WB.ActiveSheet.Name = List.Range("A" & r).Value & "AE"
Dim AES As Worksheet
Set AES = WB.Sheets(List.Range("A" & r).Value & "AE")
The problem I have is now referencing the sheet in a formula (vlookup/countif etc)
Code:
.Formula = "=VLOOKUP(BJ6,' [I][B]WHAT CAN I PUT HERE[/B][/I] '!L:AB,17,FALSE)"
Can anyone help please?