P
Phil
I have a macro that copies a sheet then names it. It goes as follows:
Sub Createsheet()
Sheets("Sheet1").Select
Sheets("Sheet1").Copy Before:=Sheets(1)
Sheets("Sheet1 (2)").Select
Sheets("Sheet1 (2)").Name = "datasheet1"
Range("C4").Select
End Sub
Is there a way to make it so that when you run the macro again and create a
new sheet and it sees that datasheet1 already exists it will name the next
sheet datasheet2? And then when you run it again it sees that datasheet1 and
datasheet2 exists and it names the next one datasheet3?
Thanks,
Phil
Sub Createsheet()
Sheets("Sheet1").Select
Sheets("Sheet1").Copy Before:=Sheets(1)
Sheets("Sheet1 (2)").Select
Sheets("Sheet1 (2)").Name = "datasheet1"
Range("C4").Select
End Sub
Is there a way to make it so that when you run the macro again and create a
new sheet and it sees that datasheet1 already exists it will name the next
sheet datasheet2? And then when you run it again it sees that datasheet1 and
datasheet2 exists and it names the next one datasheet3?
Thanks,
Phil