+ Reply to Thread
Results 1 to 3 of 3

VBA code to create template

  1. #1
    Registered User
    Join Date
    11-19-2014
    Location
    Melbourne
    MS-Off Ver
    2010
    Posts
    10

    VBA code to create template

    Hi Guys

    I am trying to do couple of things.

    I want to compare the Department name in Sheet “Total employee” range A2:G2, with the other sheet names in the workbook. If the column value that is A2:G2 in Total employee (Department Name) not found in worksheet sheet names then, I want a message box “Sheet (name) not found, would you like to create one” and if user select Yes, then then the new sheet has to be created.
    The new sheet has to be created with the similar format like Policy, Marketing, finance with the relevant data from Total employee sheet.

    For example, there is no sheet name called HR in workbook.
    But in Sheet “Total employee” Department Name HR is present
    I want to create, a sheet name called HR and in that worksheet, I want to insert data based on sheet name

    HR
    LocationName Total employees Annual Salary Date of Join
    Location1 2
    Location3 7
    Location6 3

    I am started on it, but i am struck in the beginning state itself.
    Anyone help is much appreciated.


    Please Login or Register  to view this content.
    Attached Files Attached Files

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,524

    Re: VBA code to create template

    Give this a try....should get you started.
    Please Login or Register  to view this content.
    Last edited by davesexcel; 12-13-2014 at 10:31 AM.

  3. #3
    Registered User
    Join Date
    11-19-2014
    Location
    Melbourne
    MS-Off Ver
    2010
    Posts
    10

    Re: VBA code to create template

    That worked perfectly. Thank you very much.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 1
    Last Post: 07-26-2013, 11:12 PM
  2. Replies: 3
    Last Post: 07-06-2012, 01:26 PM
  3. Code for copying a code into a specific place in an outlook template?
    By VoodooChild in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-21-2010, 10:08 AM
  4. Code to create copies of a 'template' sheet
    By Palaeontology in forum Excel General
    Replies: 6
    Last Post: 04-17-2010, 03:11 PM
  5. How can I create Macro that Create Template Fields?
    By sgraves in forum Word Programming / VBA / Macros
    Replies: 0
    Last Post: 07-17-2009, 11:30 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1