Sub Test()
Application.ScreenUpdating = False
On Error GoTo M
Dim i As Long
Dim Lastrow As Long
Dim Lastrowa As Long
Dim iday As Integer
Dim FirstMonth As Long
Dim LastMonth As Long
Dim ans As String
FirstMonth = InputBox("Enter Starting Month")
If FirstMonth < 1 Or FirstMonth > 12 Then MsgBox "Number Must Be Between 1 and 12": Exit Sub
LastMonth = InputBox("Enter Last Month")
If LastMonth < 1 Or LastMonth > 12 Then MsgBox "Number Must Be Between 1 and 12": Exit Sub
ans = MonthName(FirstMonth, 9) & " - " & MonthName(LastMonth, 9)
Lastrow = Sheets("Master").Cells(Rows.Count, "A").End(xlUp).Row
Sheets.Add(After:=Sheets("Master")).Name = ans
Lastrowa = Sheets(ans).Cells(Rows.Count, "A").End(xlUp).Row + 1
For i = 1 To Lastrow
iday = Month(Sheets("Master").Cells(i, 1).Value)
If iday >= FirstMonth And iday <= LastMonth Then
Sheets("Master").Rows(i).Copy Destination:=Sheets(ans).Rows(Lastrowa)
Lastrowa = Lastrowa + 1
End If
Next
Application.ScreenUpdating = True
Exit Sub
M:
MsgBox "You entered some improper number or sheet name already exist"
Application.ScreenUpdating = True
End Sub