Macro to replicate the naming convention of adding a new worksheet

  • I am trying to write a macro in which the macro will insert a new worksheet similar to how a new sheet would normally be added. The difference, however, is that I would like the name of the new sheet to be "Results" and follow the naming convention that is standard for new sheets (Results1, Results2, Results3.... so on an so forth) so that each time the macro is run, a new sheet will be generated.


    I am familiar with the coding to insert a new sheet, but how do I get the macro to search the existing sheets' names to find the "Results#" tab with the largest number, and then follow the naming convention for the next new tab?


    Thank you for your help.

  • Re: Macro to replicate the naming convention of adding a new worksheet


    Maybe this. :cool:

  • Re: Macro to replicate the naming convention of adding a new worksheet


    Thanks Bruce! This worked like a charm! I added a couple lines to force the new sheet to the right of the original sheet!



    Thanks again!

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!