Input In Cell Triggers Macro To Create Duplicate From Template Sheet And Rename?

Jan 22, 2014

I am currently doing an excel database of students application. I want a macro that creates a duplicate of a template sheet and renaming it based on the name of the student. Meaning once a name appears in the name cell, a sheet of that particular name is automatically created. At the same time, i want all the data regarding the applying student to appear the newly created sheet as shown in the attached file.

View 4 Replies


ADVERTISEMENT

Copy And Rename Sheet (template) From Cell Value Entered In Template?

Feb 21, 2013

how to create a copy of my employee attendance template. Is there a way to create a copy of the template by entering an employee name in the "name" cell of the template and it automatically renames the sheet that employee name and also saves or recopies the template for use with the next employee?

View 8 Replies View Related

Create Input Message Box To Rename Sheet?

May 18, 2012

im trying to create an input message box to rename a sheet.

So far I have

Dim strPrompt As String
Dim strTitle As String
Dim iRet As Integer
'create a copy

[Code]....

But I seem to be getting a complie error with it...I am trying to simply rename a worksheet to what has been put in the message box

View 2 Replies View Related

Macro - Using Sheet Template Need It To Auto-Rename

Aug 2, 2008

*Inserts an existing worksheet template and places it at the end (or after all) the existing worksheets.

What I would like the macro to also do is:

*Automatically rename the inserted worksheet (via my worksheet template) in sequence to the existing worksheets

Example: So let's say I have 3 existing worksheets titled Sheet1, Sheet2, Sheet3 (that's basically the default naming Excel uses). But would when I insert a new worksheet (via my worksheet template) it is shown as Sheet. And if I insert another one, it would be Sheet (2). So basically it is showing as such:

Sheet1, Sheet2, Sheet3, Sheet, Sheet (2)

What I would like the macro to do is automatically rename those last 2 worksheets (and any subsequent worksheets thereafter) in sequential order. Basically displaying it as such:

Sheet1, Sheet2, Sheet3, Sheet4, Sheet5...(and so on and so forth)

View 10 Replies View Related

Copy Template Sheet And Rename It?

Oct 12, 2013

I have a template sheet which i want to copy in to same workbook but want it to be renamed using a name which i fill in on a seperate sheet "articles". But I only want the template copied with the new name every time i fill in a new name in the sheet "articles". Also this procedure may not overwrite existing sheets.

So there is not a predipefined table in articles but rather it grows each time I need a new copy of template.

View 4 Replies View Related

Macro To Copy Current Sheet, Create, & Rename New Sheet From Current Open Sheet

Oct 27, 2008

EXAMPLE: Complete Sheet called "Day1". When day1 is complete you click on button and it then copies itself and creates and renames new sheet to "Day2", then when "Day2" is complete you click on button and it then copies itself and creates and renames new sheet to "Day3", and so on and so forth to "Day30".

View 9 Replies View Related

Macro - Rename Only & Sheet... & Tabs With Last 8 Characters From Cell

Nov 5, 2009

I pull an excel sheet from a database each day that gives me sales data for different products sold. The way the spreadsheet comes from the system, the first tab is named "Document Map" and lists all of the products, and each product then has its own tab but they're generically named (Sheet1, Sheet2, etc.). The name of the product is always in cell T8, but the name itself is only the last 8 characters of that cell.

What I'm hoping to accomplish with a macro is two things:

1) Retrieve the last 8 characters from T8 in each tab, and name the tab with those characters (same effect as the formula "=right(T8,8)").
2) Ensure that this only occurs on tabs with the word "Sheet" in the beginning. Depending on the day, there could be any number of products and they each get their own tab, so I was hoping to be able to get the macro to only work on sheets where the first 5 characters are "Sheet" regardless of the number after that.

View 9 Replies View Related

Create New Sheet (Template) VBA

Jul 1, 2014

I am creating a macro to create a new sheet that is a template that has already been created. I want to create a variable that references this new sheet so I can use it in a sum function.

Here is what I have:

Sub TotalSum()
'
' TotalSum Macro
Sheets("Sheet1").Select
Sheets.Add Type:="C:Users cweberDesktopNCR & NDE TEMPLATE.xltx"
'
Dim WS As Worksheet

WS = ActiveSheet.Select -------> I want to reference WS as this newly created template.

View 7 Replies View Related

Rename Sheet - Hide It - Create Copy Of Same Sheet

Dec 21, 2011

I have about 100 products and each has its own sheet that I fill with data. Once I have finished with a sheet I rename it and create a copy and then hide the original and delete the entered data from before and start over.

Is there a way I can make it so when I hide a sheet it will automatically create a copy and delete a specific range?

View 1 Replies View Related

VBA - Create Sheet From Template But Cancel If Sheet Already Exists

Nov 26, 2013

Code:

On Error GoTo ErrorHandler
Dim createsheet As Integer
createsheet = MsgBox("Do you want to Create a Sheet for Uncontrolled Discharge?" & vbNewLine & "NOTE: if the sheet already exists, you cannot create a sheet with the same date - select NO", vbYesNo, "Caution")

[Code] ...

ErrorHandler:
MsgBox "There is already a Sheet Created for that Date.", vbCritical
End If

Right now...it will pop up the error message but it will still create a "template" sheet with the suffix (2), (3), etc... instead of canceling the create new worksheet operation.

View 9 Replies View Related

Create New Sheet Based On Template?

Feb 9, 2014

I have a master template with columns running from A to Q. Most of what she wanted is fairly simple 'if' statements, however she also wants to move the contents of one cell to an adjacent sell based on the number exceeding a certain value,

[Code].....

My problems start when I want to create a new sheet/tab and let her name it. I would have simply created 12 months for her, unfortunately there is a sheet for a number of people and the start of the year can vary. My simple solution was to create a macro that copies the original Template (effectively sheet 1) and puts it into the newly created tab. However this does not copy the above VBA code across

[Code] .....

View 1 Replies View Related

Create New Sheet From Template - Problems With Names

Nov 15, 2007

I have 8 different workbooks which is 100% similar. Only values registred on each sheet is different. the format and rows/columns are the same.

The sheets is something that changes, when I want to improve layout etc.
I have one Template book where I do the changes and try to export this to the other books (call it upgrades). For macro moduls it works nice, just replace.

The problem is the sheets. When I have changed a sheet, replace it, it would not adopt values from the other sheets.

Ex. In sheet 2 I have named the cell 'B60' for U_KU in the new sheet 1 I expect at using =U_KU in cell I7 would adopt the values from B60 in sheet 2. But nope.

I can see that there is an link to the template workbook in edit ->linkage. Would this cause problem?

View 2 Replies View Related

Change Cell Triggers Macro To Run

Nov 22, 2009

I have a macro that I would like to run everytime ANY cell is changed in a given worksheet. I've read some posts that explain how to do this when say ONE cell is changed, but I cannot figure out how to expand on that.

View 9 Replies View Related

How To Create A Macro To Add New Worksheet And Rename It

Aug 25, 2009

I tried recording a macro to add to a new worksheet, but it gives error while running.

Issue as I understand is, by default excel gives a new worksheet a name (Say Sheet 4), and when u run macro worksheet, new created name may be different.

View 7 Replies View Related

How To Create Macro To Add New Worksheet And Rename It

Oct 3, 2012

I need to have many users press a button within the excel sheet that duplicates the form from the current page, opening a new tab (copying the form) that also prompts to input a specific name e.g. "Enter date and day or night shift" to name the tab itself.

I have just worked out how to put a Command Button in and used the above code to create the new page assigning the code to it.

I need the "my sheet" to be prompted and customisable.

View 3 Replies View Related

Macro To Save Duplicate File And Create Folder Name Based On Cell Value

Nov 25, 2009

I currently use the following code to create a duplicate file based on two cells within a directory and folder i specify. These cells consist of the team and week commencing date (mondays date of week which is cell 'Main Menu'!K8)

View 7 Replies View Related

Create Macro To Rename Worksheets In Other Folders

Dec 23, 2008

I have created an appointment schedule spreadsheet. Once I get the spreadsheet running smoothly, I would like to create a worksheet for every day of the year that we are open.

I have decided to have one main folder with 26 subfolders in it. In each of those 26 subfolders, there will be one workbook with 12 worksheets in it. That will be two weeks worth of appointments as we are open Mon-Sat. Of course I want to name the worksheet tabs at the bottom of the workbook according to the appropriate calendar date. Then there is also a cell at the top of each page that also has the date, the same as the date on the tab. Just wondering if there is a simple way to create a macro to rename all these worksheet tabs, or if I have to physically open up each workbook, and rename all the worksheet tabs according to the calendar date. Then once the worksheet tab is named, can you make it automatically put the same date into Cell A1?

View 9 Replies View Related

Macro To Create Multiple Sheets From Template?

Nov 10, 2011

I'm trying to create a workbook with multiple worksheets. My first sheet to be named "Main" and each additional sheet to be named in sequence after the values in the cells between B5:B98 on !Main.

Example:
B5 = "01"
B6 = "01.1"
B7 = "01.2"
B8 = "02"
B9 = "03"
etc...

I'd like to have a macro that would take a worksheet in this workbook named "Template" and make a copy for each cell between B5:B98 and name that new worksheet "c" and then the value in each of those (B5:B98) cells.

Example:
First worksheet named "Main"
Second worksheet named "c01"
Third worksheet named "c01.1"
and so on.....

View 1 Replies View Related

Create New Sheet From Template Sheet

Oct 31, 2006

I am using a code to create a new sheet using a click button, and currently have a template file that is being used.

Private Sub cmdNewSheet_Click()
Sheets.Add Before:=Sheets("Finish"), Type:="C:Documents and SettingsAdministratorMy Documents Stock ControlStockTemplate1.xlt"
Sheets(Sheets.Count - 1). Name = txtNewSheet.Text
txtNewSheet.Text = ""
End Sub

What i want to do is use a sheet in the workbook as a template. The sheet i want to use is simply called 'Temp', and the workbook i am working in is called Stock1.xls. Is this possible? I have had a look at past threads, but cannot find anything that points me in the right direction.

View 5 Replies View Related

Input Box To Create And Input Info Into A Formula Which Then Populates A Cell With A Value

Jul 24, 2014

I am trying to create a macro which gives me an input box. I need to enter 2 numbers into the input box. It would be as follows:

Input Box Msg 1 - "What is your labor cost?" (NUM1)
Input Box Msg 2 - "What is your productivity rate?" (NUM2)

Then I need the macro to take this info and enter it into a formula which changes according to the row which you are on. (I need the macro to work based on which ever cell I currently have selected). The formula would be this if I currently had a cell on row 10 selected:

=(NUM1*(NUM2*$H10))/$H10

So, if I currently had cell L10 selected, and I ran the macro and put 100 in for "NUM1" and 10 for "NUM2" and my sheet had 20 in cell H10, then the macro would enter the number 1,000 into cell L10. If I had L500 selected, then the macro would enter the final number into cell L500 based on what value H500 contained.

View 9 Replies View Related

Macro To Create Sheets In New Workbook Based On Template And Evaluator?

Feb 10, 2013

I had created a base data with evaluator and performance appraisals templates which should be sent to each evaluator for filling up the forms based on templates

Next,

Macro that would i require will be

Where in my base data if i select filter of "Arun", i will performance appraisal templates in column I. Next, i have sheets individually created templates which refer column I

So, based on arun filter if i select, it should create a new workbook for arun and six individual sheets of employees reporting to him with a base data and appraisal templates similarly if i select anita in filter , it should create a new workbook for anita and six individual sheets of employees reporting to her with a base data and appraisal templates

View 9 Replies View Related

Macro To Create And Rename Multiple Worksheet And Then Placing Relevant Data

Feb 24, 2014

I want to find a way to create multiple worksheets and matching data to be placed on appropriate sheets.

Here are more details (Please check the attached sheet screenshot as well):

Excel_Macro_Requirement.jpg

In a workbook, there is a "Master-Sheet". This master sheet contains 8 columns.

I want to create as many new worksheets after master sheet as the values are there in column B (Column 2 i.e. Ad Group). In above attached screenshot, there are 8 values (B2:B9 or A-H). So, I would like to create 8 new worksheets after the master sheet. Also, I want to rename them based on their value from Ad Group column.

Each newly created worksheet should have same columns as the master sheet . Same 8 columns with their name intact.

Finally, I want all matching data of the Ad Group values to be placed on their respective newly created worksheet. For example, worksheet A should have A2:H2 data. Worksheet B should have A3:H3 data, and so on.

Please note that same ad group may have more than one row data. But I don't want to create multiple worksheet of same name ad group. The worksheet should be just one, but all matching data should be placed in that one sheet.

I know it is a bit complex task, but I am sure there would be a way to perform this automatically - probably a macro.

View 1 Replies View Related

Macro Copy Of The Active Sheet And Then Rename The New Copied Sheet

Jul 30, 2009

I'm trying to create a copy of the active sheet and then rename the new copied sheet to what's in cell O4, which is a formula (see below) and then paste value cell O4 in B3 of the copied sheet. However, when I run this macro it doesn't seem to like the second line where I am renaming the sheet (run time error '1004').

"O4" =DATE(YEAR($B$3),MONTH($B$3)+1,DAY($B$3))

Sub NewMonth()

ActiveSheet.Copy Before:=Sheets(Sheets.Count)
ActiveSheet.Name = Range("O4").Value
ActiveSheet.Range("O4").Copy
ActiveSheet.Range("B3").PasteSpecial Paste:=xlPasteValues
End Sub

View 9 Replies View Related

Macro To Rename Sheet Tab

Aug 24, 2012

I run a report each month which renames the tab name called ex. "xxxxx Report 8". The 8 meaning for the month of August. I have created a macro to rename the tab, but each month when i generate the report the tab name change, hence i would have to change my macro again to reflect the tab name. What formula could i use in VBA to change the name of tab so i would not have to change my macro each month?

I currently use as shown below, which does not work since the number changes each month when i generate the report):

Sheets("xxxxx Report 8").Select
Sheets("xxxxx Report 8").Name = "Monthly Report"

View 4 Replies View Related

VBA Macro To Auto Change Cell Color On Protected Sheet Based On Input

Apr 13, 2009

I have a macro code for conditional formatting. The first 2 lines of the macro are


Private Sub Worksheet_Change(ByVal Target As Range) ....

View 9 Replies View Related

Add Custom Sheet Template Macro Code

Mar 21, 2008

I am trying to use the worksheets.add method with the Type specifier pointing to a file location containing a worksheet template.

View 9 Replies View Related

Macro Code To Add New Sheet And Rename With Data Given In Cells

Feb 11, 2014

I need a macro code to add and rename sheets as per data given in column "A".

ie if column A has
SBC
DFG
UY
IKJ

4 new sheets to be created with name given above (Column A). PS:- the data given in column A will not be limited to 4 rows, it ll be > or < 4.

View 9 Replies View Related

Create Formula That Links To Another Sheet Based On User Input

Jan 8, 2009

I'm trying to create a formula similar to this:

=Calculations!(Indirect("N"&A2)-Indirect("AB"&A2)+Indirect("AA"&A2)

The idea is that the user will enter a value in cell A2. That number will determine the appropriate rows in the formula above.

View 6 Replies View Related

Create A Dynamic Array So That When A User Enters The First Sheet Name Via An Input Box

Nov 20, 2008

I'm trying to create a dynamic array so that when a user enters the first sheet name via an input box, excel will know to select the other sheets with ending (2), (3), (4) etc.

Currently this code works only if there are 4 sheets present (as I set this way), anything lower/higher is out of range.

How do I make it so that it will select sheets if there are less than 4 sheets present?

I tried nesting, but I pretty sure this array needs redimming or something. Is ubound a better option?

View 5 Replies View Related

Create Single Input Sheet That Automatically Feeds Data?

Jul 9, 2012

I am trying to create a single input sheet that automatically feeds data into several other worksheets within the same workbook. Some of the sheets use the same data, some are completely independent of each other. The point of having this is so that users can go in, fill in the input sheet, and the other sheets will automatically be filled with data from the input sheet.

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved