Excel VBA/Macro programming help?!?
Excel Macro (VBA) programming help?
Basically, I'm looking for a macro code that would help me create a new sheet AND call it ''week1''. Then, next time you click on the macro it would create another new sheet and call it ''week2'', then ''week3'' and so on.. (I also want the new sheets to have some data in them already, as soon as they are opened, so could you leave some room in the vba for that? if not then it doesn't matter)
So yeah, any help would be appreciated. Thanks.
I thought i'd ask it in another category just in case, jeez :|
- garbo7441Lv 78 years agoFavorite Answer
Here is one basic macro to do as you wish.
For Each ws In Sheets
If UCase(Left(ws.Name, 4)) = "WEEK" Then
If Right(ws.Name, 1) > ctr Then
ctr = Right(ws.Name, 1)
ActiveSheet.Name = "Week" & ctr + 1
If you can provide the additional information you wish to add to each new sheet, perhaps we can amend the code to handle that, also.
- pete lLv 68 years ago
You asked this Q once,already