Condition 1 - to copy selected sheets to a new workbook and Save it in the same location with a fixed name – Sorted with below Blue Text
Condition 2 – Create multiple new sheets in the condition 1 workbook and rename from the range mentioned below in Green Just having issue with the highlighted red part as it always creates one extra sheet apart from the range mentioned as sheet20 or 21 or some other number
Condition 3 - Which I am struggling with is that sheets created in condition two should actually be a copy of Audit Form FSR B which we generated in condition 1 and renamed as per range mentioned in condition 2
Sub FSRB()
With ActiveWorkbook.Sheets(Array("FSR Level B", "BI"))
.Copy
ActiveWorkbook.SaveAs Filename:=ThisWorkbook.Path & Application.PathSeparator & "Audit Form FSR B", FileFormat:=52
End With
Dim sheets_count As Integer
Dim sheet_name As String
Dim i As Integer
sheet_count = Range("B17:B70").Rows.Count
For i = 1 To sheet_count
sheet_name = Sheets("BI").Range("B17:B70").Cells(i, 1).Value
Worksheets.Add().Name = sheet_name
Next i
End Sub
Condition 2 – Create multiple new sheets in the condition 1 workbook and rename from the range mentioned below in Green Just having issue with the highlighted red part as it always creates one extra sheet apart from the range mentioned as sheet20 or 21 or some other number
Condition 3 - Which I am struggling with is that sheets created in condition two should actually be a copy of Audit Form FSR B which we generated in condition 1 and renamed as per range mentioned in condition 2
Sub FSRB()
With ActiveWorkbook.Sheets(Array("FSR Level B", "BI"))
.Copy
ActiveWorkbook.SaveAs Filename:=ThisWorkbook.Path & Application.PathSeparator & "Audit Form FSR B", FileFormat:=52
End With
Dim sheets_count As Integer
Dim sheet_name As String
Dim i As Integer
sheet_count = Range("B17:B70").Rows.Count
For i = 1 To sheet_count
sheet_name = Sheets("BI").Range("B17:B70").Cells(i, 1).Value
Worksheets.Add().Name = sheet_name
Next i
End Sub