I am trying to create a copy of the sheet "template" using a list of department numbers from the sheet "list". The following code works sometime but other times it stops without copying a sheet for all the names in the list.
Dim NewSht As Worksheet, Crow As Integer, NewName As String
Dim c As Range, wks As Worksheet, TempName As String, BaseName As String
Application. ScreenUpdating = False
Set wks = Sheets("List") 'list of department numbers to be copied for a sheet.
The following URL has a great solution to this problem, I was unsuccessful in implementing it. Excel VBA: Create Worksheets for Each Item in an Excel Table of Data
Need A macro to copy a pre-set sheet, we can call it a "template sheet", for each name in a pre-set range, a list. This list will have empty cells and names from F9 to F190. For each name i need it to copy the template sheet and place the sheet name within the new sheet. Should a user delete a sheet, activating the macro again should re-create the missing sheet and not just crash (was told there could be an issue).
So I have a guest list workbook. There are two sheets. On the first one is a list of names on Column A. On Column B is a classification: 'C' if confirmed; "D" for declined; "I" for pending. I want to have all the names with "C" on sheet 1 appear on sheet 2 automatically.
I want to create a macro button that can create copy, insert, paste and rename the new sheet in next month's name, like if the active sheet's name is January, I want to copy the whole sheet of January, insert new sheet, paste the new sheet and rename the new sheet to next month like February?
Also rename the new sheet (February) cell B3 the same as new sheet's name (February)
So if month of February is near end, the macro button in February will create the same way as Jan did which means the next sheet will be named March and so on.
I have a workbook with a hidden sheet ("Template") and a visible sheet("New Job"). I need code so when cell F1 in "New Job" is populated:
1-the sheet is renamed to the value of F1, 2-a new tab is made (a carbon copy of the hidden sheet "Template") 3-the new tab is named "New Tab" and marked as unhidden.
Public Sub Worksheet_Change(ByVal Target As Range) ActiveSheet.Name = Range("F1").Value End Sub
Function WorksheetExists(SheetName As String, _ Optional WhichBook As Workbook) As Boolean Dim WB As Workbook Set WB = IIf(WhichBook Is Nothing, ThisWorkbook, WhichBook) On Error Resume Next WorksheetExists = CBool(Len(WB.Worksheets(SheetName).Name) > 0) End Function..................
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?
I am copying info from a program into the "Input" worksheet - It is from my phone switch of logins and logouts of my employees. I have 11 supervisors and my end goal is to have each one of their coordinators show up in their specific tab automatically with all of their login information, ids, logins, and logouts. I can do the other math for the Marks and break lengths but I am having a hard time with this. I have been trying vlookup, but cannot figure out a way to bring all of the different rows... It only brings over one row.
I have tried to use some of the code from other posts on this sight, but have not had any luck.
What I am looking for it to do is on the Alis worksheet - the light blue sections. I am also finding it difficult in the light purple section also. I am trying to figure out how much time they were on the clock.
I have a list of client information on a worksheet. Every client is under a certain "Exp. Code". The team supports their clients by "Exp. Code". I would like to create a macro to segregate this data according to worker on different worksheets. Each worker supports multiple Exp.
I want to create a loop, that copies the cell B11 from each sheet, and creates a new sheet called "Average". In this sheet I want it to add sheetname in column A, and in column B the value fetched from that sheet..
I have the below code, I want to end up with values in column 'A', and a hard coded value in column 'B' for each row in column 'A'. But, I'm ending up with the hard coded value just in the first row of column 'B'. In other words, I want to repeat a value and copy it down column 'B' the same number of times that there are values in column 'A'. Here is what I am working with so far that is producing just the value in the first row of column 'B' -
Private Sub dispnames() Dim b As Integer Dim r As Integer Dim sh As Worksheet
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".
I have a master list of names on sheet 1 column A. I want to create a list of names on sheet 2 column A of the people from Sheet 1 column A that have a specific value (Y) in column z sheet 1. I might also want to different numeric values for the Z column
I need to make a Workbook that has hyperlinks in the first sheet that links to a cell in a second sheet and then back again. The only way I have been able to do this is manually create each link in each sheet. I am hoping that this process can be automated as they can not be 'filled' as far as I can see. find attached an example of what I am trying to achieve.
to copy column C and D, from row 3 to the end, from sheet2,in sheet1, column A and B, starting with row 2 and after that I need to create a border to the copied values and I need to create a border to the empty cell from column C.
This macro below is meant to search a sheet for a user selected value, select the entire row and copy it into a new sheet that has been created under the name of the user selected value. It will create said sheet, but isnt finding the value and/or copying the active cell row. Im not getting any errors so it has no issue with the coding itself, it just doesnt work, have i missed something obvious again?
I was given a spread sheet that prepares a file for export to some ones system. The macro in the spread sheet wouldn't run as I'm using excel 2013 which when you open a new work book it only opens sheet 1 and there was a bit in the macro that wanted to send information to sheet 2 which wasn't there. I added a bit of code which created sheet 2 and hey presto it worked fine. I made the mistake of telling the people who supplied the original workbook to me what I had done so that they could pass the modified sheet on to other users in case they had the same problem.
Now I've been asked if I could do a bit more work to the existing macro so that instead of the new workbook just being called Book 1 could I add a name and date to the new workbook being created.
I've had a look at the original code and it looks like it would be quicker to start from scratch as I cant follow the original code.
The existing workbook has 3 sheets, I want to copy sheet2 to the new workbook. I want to name the new workbook as "a fixed name" with the "time and date " .xlsx
I have just inherited an Excel spreadhseet that displays job titles and what types of documents each one should be trained on. What I am trying to achieve is a formula, or something to that sort, that will look at each job individually and tell me only those documents that they need to be trained on and list it on a seperate sheet.
If you look at the attached document you will see that the first 2 columns contain a document number and description. Across the top you see each of our job descriptions. In the middle you see an X that indicates that person should be trained on that document.
So once more, I would like to take each Job Description (seperately) and list only the documents that have an "x" in their column on another sheet. I already have the sheets created, I just need to know if there is some kind of formula or macro that can do this for me.
I download a daily inventory file from my supplier. . I sell only selected products from that file. . I would like to use a list of the product part numbers of the products I sell on sheet 2 (Inventory) and have all the results from sheet 1 (ProductFeed) built into an expandable table on sheet two including all the parts numbers (expandable because I will add or delete part numbers from the list) I have listed and not just one part number but several. . Second issue: the download file contains part numbers in column "A" with variables like 418, 418_color, 418_size etc.... I would like all part numbers that begin with the number 418 and the ones that contain the variable added to be listed in the new table so I will get a list of all part number 418 and the variables which include 418 in them. . I want to return the results of the whole row(s) of the matched data as well in the new table. . I have attached a file of the working data that I have with the data I will use although the ProductFeed will change daily which I intend to copy and paste into the table each day.
I need to copy the Selected Sheet (Sheet name will be different each month) on a spreadsheet and paste the copy to the left of the selected Sheet. Then I need to copy and paste values the entire sheet of the sheet that the copy was made from (the one on the right). I am very new to macros, and I tried recording and manually editing the macro with no success. The number of sheets will be different always as I will be adding this to different workbooks and also because new sheets may be added to any workbook at any time. I attached my code that I came up with, as I am not familiar with code enought to "[code]" my code.
I'd like to do is to use loops to copy each value in "Sheet1" into every other row in column B of "Sheet2" starting on row 16. I realize that this is a simple task, but I'd like to know how to do this for the purposes of learning the correct VBA coding.
I need to create a new sheet, and pull all the rows (14 columns each) from another sheet in the document that meet a certain criteria. Fortunately, that criteria is all in one column; unfortunately, out of about 30 different entries in that column, I need it to pull 7 of them, 4 of them have been input 2 or 3 different ways.
I know I can go through the list of 900+ by hand and copy the rows, but there has to be an easier way right? Here is the list of all the spellings of the ones I need to pull..
D.C. DC DPM DPT Ed.D EdD EDD JD Ph.D Pharm. D PharmD PhD
I have A dropdown list (form control combo box) ...in that the values are jan,feb,mar,apr... property of cell link is given as C4..... now my doubt is suppose if i select mar from drop down, in sheet the cell C4 should Show Mar only.....
I need to get data copied from sheet1 to sheet2 depending on selection in a validation list.
The data is on the same row and all the same range. So it would look something like this. A B C Fruit Orange Apple Pear Veg Potato Carrot Onion Animal Bear Cow Dog
I have the data in A in a dynamic range and validation list. I need all the data copied from the specific rows ie choose Animal from the validation list in Sheet2!A1 and the entire row Bear Cow Dog get copied to Sheet2!B1, Sheet2!C1, Sheet2!D1.
The second problem I think is a lot more complex. So the same scenario above but this time its a multi select on Sheet3. I need to be able to select two (or more depending on Fruit and Animals to display in A1, A2 and then their valid options to appear in B, C and D
I have a large sheet with serial numbers of machines in one column and more or less important information in other columns. Iím trying to write a macro that is activated by selecting a serial number from a list box. The macro should then find the right row and copy cells from that row and paste them on another sheet to create a summary of that machine.
I have a workbook that has 31 sheets representing the days in a month. Each sheet is identical to each other. The naming convention for each sheet is as follows...(1,2,3,...31). The very last sheet is named "Summary". On this sheet I have in column A the dates from the beginning of the month dragged down to the last day of the month in this format xx/xx/xx. To the right I have it equal to a particular cell (M33) corresponding to the date. So for 04/01/2012, the value in the cell to the right is (='1'!M33). Instead of repeating the process of "=" the click the next tab and get M33 on that tab....is there a faster way of doing this where I can enter a formula and drag it down pulling all the "M33" from each sheet?