I have a workbook with about 25 sheets. All the sheets are named. I'd like either a Macro or some VBA code whcih, when the user clicks a button will Unhide selected sheets, say "Equip Labor", "Equipment", Proj. Summary" and "Implementation Guide" and then copy these sheets into a new workbook created on the fly (Book1.xls) and then in the original workbook re-hide all the selected sheets. This way the user can save the new workbook as whatever name they want. Is this possible? The closest post I could find was this: http://www.mrexcel.com/forum/showthr...opy+Worksheets I tried to modify this, but I'm not that good yet with VBA.
I have a spreadsheet with customised formats and formulas and the problem is that when add a new row I have to go through and manually copy all the data to the new row and as there are many columns in the spreadsheet this takes forever.
Is there anyway I could automatically copy all the formats/formulas when I insert a row?
PS: I do not want to copy any data into the cell only the formatting and formulas
I am working on a resource management type workbook. In the first sheet,(Project Assignment) managers can enter staff, staff type and hours needed for the next three weeks. In a separate sheet,(Total Hrs per week) I have formulas set to total the hours entered from the first sheet for each resource - using the formula =SUMPRODUCT(--(staffassignments=$B4),--(Week1)) for each week, for each resource. That woks fine.
What I would like to do, if possible, is to present a type of data validation, dialog or popup when the resource's "total hrs per week" total = 40 hours. Different managers use the same resources, so one person may have time entered in multiple times for different projects in the Project Assignment sheet.
Is it possible to use the totaling formula (=SUMPRODUCT(--(staffassignments=$B4),--(Week1))) and an if statement in the data validation or conditional formatting to let managers know that the resource is fully utilized?
In my spreadsheet, I have approx. 300 'blocks' of data, one for each 'vendor'. I am tracking 5 stats for each vendor for 12 months. Each 'block' has 5 formulas WITH conditional formatting (only one condition used) for each month, so each 'block' has 60 individual cells with conditional formatting. Excel throws an error when I try to copy the block of formulas and formats down the sheet a few hundred times. I have figured out it isn't the formulas that is the problem. It must be some kind of limit Excel 2003 has for how many cells in a workbook can have conditional formatting.
As the buyer edits orders, I have a macro which pulls out all the parts with changes and puts them on a sheet named "Changes" in the attached "Sample" workbook. Since the buyer will do dozens of these edits a day, I'm trying to create a simple way for them to create a list of parts they may want to try and buy from another source.
I would like to add a macro that would open a message box telling the buyer to select the parts they want to copy. They could select whatever rows they want to copy to the "Backorder List", and select "OK" or hit "Enter", and the macro would open the workbook named "Backorder List.xls" on their desktop, (mine is located under "C:Documents and Settingsjerry.hutchesonDesktop"), and copy the selected rows to the workbook, then save changes and close the "List" workbook. It should only paste the values, to preserve whatever formatting is in the book being copied TO, and it should copy below any data already in the workbook.
To make things even more difficult, the macro would also need to copy the Vendor # and PO # from the top of the "Sample" workbook, (cells B2 and B3 respectively), and enter that data beside the other data just pasted beside the parts data in the backorder list. (I have entered sample data in the backorder list to show what I mean.)
I have a workbook that has a lot of formulas in it that reference material stored on my local computer.
I need a macro that will copy all 42 tabs in to a new workbook book without all formulas, but saving all the formats have made. This would save me from every other day coping and pasting manually each of the pages.
I borrowed the macro below from this forum. My formulas in the sheets I'm copying refer to other sheets that I'm not saving. can someone tell me how to change it so that it copies values only to the new workbook as I'm only saving it for records purposes and some cells are saved with #REF errors.
I'm guessing there's a spot where I should type .Value ? Copy.Value doesn't work.
I am looking for a code that would copy the data from each worksheet in a given workbook and then paste to just one worksheet within a different workbook. The Sheet names are auto generated when I run this canned report but the naming structure is always the same...the first worksheet is named Repair Details and then the next sheet is named Repair Details_1, the next sheet is named Repair Details_2 and so on for every sheet in workbook. So I would like to copy all of the data(Headers to last cell) and then paste in a worksheet(ex: Master Repair Report.xlsx and the worksheet could be titled Master Repair Details) on a different workbook, then the next sheet would copy from the one under the header to the last record and paste to the same workbook. This process would repeat for every worksheet in the Repair Details Workbook and paste to Master Repair Details worksheet in the Master Repair Report workbook.
I have a workbook (Sheet 1 contains - 6 columns and 1000's of rows). Column B has sensor type. Is there away to copy all data the deals with each sensor and paste it on a new sheet in the same workbook and name these new sheets by sensor type
Example Date Sensor IP Address DNS Error 1/1/2014 Unix 188.8.131.52 fatty clock error 1/1/2014 HP 184.108.40.206 slim power isues
I have workbook named "Distribution and Revenue" which is contained 14 sheets , which names are like "UB Distribution", "UB Revenue", "SB Distribution", "SB Revenue". I want only all Revenue Sheets Data (leaving Last Row) to be copied to another workbook "F:DataFinal Result.xls" in sheet named All Revenue.
computer just doesn't have the horsepower to run all of the sheets and the formulas and put them together on one sheet in the same workbook.
I was wondering if it would be possible to take the identically arranged sheets from one book and paste the VALUES over to One page in another book.
I'm guessing you'd need to know the directory of the workbook and the title?
Below is the macro i run to compile in to one page in same workbook: (Summary3 is an arbitrary name for the new page, HEADERS is the name of the page that holds the headers for all of the categories, 2014 URL, RAP and DB_Template are the three sheets that I don't want to copy in to this new page)
The headers are in each sheet from B2:DL2 and the data would be from B3:DL75.
I am looking for an update to the following macro that would paste all of the VALUES from each of these sheets in to a new workbook on a single page.
Sub CopyAll() Dim ws As Worksheet Sheets.Add.Name = "Summary3" Sheets("Summary3").rows(1).value = Sheets("Headers").rows(1).value For Each ws In ActiveWorkbook.Worksheets ws.Activate If ws.Name <> "2014 URL" And ws.Name <> "RAP" And ws.Name <> "DB_Template" And ws.Name <> "Summary" Then Range("B2:DL75").Copy Sheets("Summary3").Range("B" & Rows.count).End(3)(2) End If Next ws End Sub
My excel database has a master sheet where all data is included. It consists of 8 columns with two rows of headers (1st row: Sheet title, 2nd row: Categories for the columns like, name, salary, emp. start date, Boro,emp. number...etc.
Master sheet aside, I have 12 other sheets in the same workbook (Feb-Jan), we run a fiscal year, not calender. The data that is included in the master sheet needs to copy over to the corresponding worksheet sheet month as long as the date in the emp. start date falls with the month range. For example, if my master sheet has data in rows 4,5,7,9,19,23,101...600 and the emp. start date is in the range of from June 1st, 20xx through June 31st, 20xx then all the data in that row should copy over to the next available row in the month of June's worksheet. The same should happen the months of Feb - Jan.
I use the command ActiveWindow.SelectedSheets.Copy to copy selected sheets into a new workbook. As a result of this line is a new workbook created and a the selected sheets are pasted into the new workbook. Is it possible to paste only values by using a single line like this?
how you would write a macro to move a selection of sheets to a workbook called Digi's in the D drive. Also if there isn't a Workbook called Digi's already it needs to add one. I've found some code to loop through sheets but nothing to show what sheets the user has selected
I have a code that will allow me to copy three worksheets from an open workbook to a new workbook. That works great, but I only need only a selected range from each of these worksheets to be copied (Range A1:AV60). Here is the code I use to select and copy the worksheets, how do I add a range within this code for each worksheet.
I am trying to create a method to select the values of contiguous range selections on excel worksheets.
Users will be making new worksheets in new workbooks out of the data from the old sheets.
Currently users make a selection is and copy it to a new worksheet.
Is it possible to retrieve from the 'clipboard', the values from the associated cells?
And then to parse them into columns in a new worksheet?
Earlier I tried this bit of ( it didnt work )
Sub AddNew() ' for passing highlighted text into the form so that I can pass it 'to a new workbook. Dim PassData1 As String Selection.Value = PassData1 Set NewBook = Workbooks.Add With NewBook .Title = "xxx" . SaveAs Filename:="xxx.xls" End With Range("A1").Value = PassData1 End Sub
I am using this code to copy columns C,D, and P from a user selected workbook into position C,D,E of workbook "Checklist.xlsx" (the one from were I run the VBA code). I don't have a clue about VBA, just have been gathering info, but the code works pretty fine. The only issue is that it opens twice the workbook "wbExt" hence the system prompts me if i want to reopen the already open workbook.
1) Is there a way to copy the 3 columns at once? something like "Columns("C:D, P").Select". 2) Is there a way to select the workbook from were to copy the column without needing it to actually open? 3) is there a way to paste the columns starting from row 3 instead of row 1 (Range("C1").Select)?
I have a workbook with 30 some sheets. I would like to have a macro that if i select multiple sheets, will paste the values and formats of those sheets into a new workbook. I would like this to keep the names of the worksheets when transfered to the new workbook.
Thus far, I have been using this code, which does nearly everything i want, but instead of pasting the values, it gives me #VALUE! for nearly all the cells. Most of the cells are using Vlookup and/or Indirect functions to reference other sheets- not sure if this is relevant. The few cells that do paste accurately are either text or simply reference another cell on a different worksheet without a function.
Here's my code.
Sub PasteShtVal() Dim w As Worksheet ActiveWindow.SelectedSheets.Copy For Each w In ActiveWorkbook.Sheets With w.UsedRange .Value = .Value End With Next w End Sub
I have a table with 15 columns and 10 rows (initially all cells are blank but with formulas and formatted) and I want a way to add automatically a new row in my table each time something is entered on first cell in each row. For example if I enter something in cell A1 (first cell in my table) then automatically add 11th row and if I delete the value in cell A1 it is ok to leave the 11th row there but if I I go on and enter a vlaue in A2 then add row 12th. Of course I want the new rows to have the same formats and formulas as the previous ones.
I have an excel file with 9 sheets and I want to copy all the data from those sheets to a master sheet but with out the formulas . I need the values only to appear in the master sheet. I used the following vba macro code which I found it while I was searching for an answer, it did it perfectly except for the formula part. !! I guess, it has to be edited by adding some codes with paste options but I don't know how!
Code: ' CollectMasterData Macro ' Sub CopyToMaster() Dim wkSht As Worksheet Dim DestSht As Worksheet Dim DestRow As Long Set DestSht = Sheets("MasterData")
Note: my headers are @ row 1 and 2 and my formula is in column A.
I have a workbook that has quite a bit of data and goes through a lot of processing to arrive and a final summary worksheet. I want to take this summary worksheet and copy the values to a new workbook.
The issue is when I use the following code, it pulls the worksheet into a new workbook with the formulas (which turn to error messages since there is no longer a connection to the data source).
I could lengthen the code to create a new workbook, select the original data, copy, paste values into the new workbook, but that approach seems longer than needed. I'm sure there has got to be a way to copy just the values quickly and simply.
HTML Code: Dim Template As Workbook Dim SourceData As Worksheet Set Template = ActiveWorkbook Set SourceData = Template.Sheets("Summary") SourceData.Copy
At this point I now have a new workbook with one worksheet full of "#N/A" and "#VALUE!". Is there a way I could do something like "SourceData.CopyValues"?
Is it possible to use VBA code to save a copy of your workbook while removing all formulas and replaceing them with values and formats only? I know how to save and rename, but can;t find the command for a "Static Copy".