Posts by DadBurne
-
-
-
-
-
-
-
-
Code
Display More'Function extracted from ERLANDSEN DATA CONSULTING Function SheetExists(strSheetName As String) As Boolean ' returns TRUE if the sheet exists in the active workbook SheetExists = False On Error Resume Next SheetExists = Len(Sheets(strSheetName).Name) > 0 On Error GoTo 0 End Function Sub newSheets() Sheets("Sheet1").Activate For Each cell In Sheets("Sheet1").Range("A1", Range("A65536").End(xlUp)) If Not SheetExists(cell.Value) Then Sheets("Sheet2").Copy After:=Sheets(Sheets.Count) ActiveSheet.Name = cell End If Sheets("Sheet1").Activate Next End Sub
-