on my workbook i run a macro and this macro copys my current sheet and then it creats a new sheet that should be "shop" and then when i run the macro again the next new sheet should be "shop2" and then "shop3" ..
i need something like this
ActiveSheet.Copy After:=Sheets(1)
ActiveSheet.Name = "shop"+1
I've created a chart in sheet 1 in a workbook. I want to copy and paste that chart into another sheet (lets take sheet 2) of the same workbook. I am using Excel 2010 version.
Whenever, I try to copy a graph and want to do "Paste Special as Link picture". The problem I am facing as "Paste Link" option is inactive.
1. Sheet1.xlsx (regular excel sheet as the extension is .xlsx)
2. Consolidated.xlsm (macro enabled sheet as its extension is .xlsm)
1. Copy both the files on your system under a particular folder.
2. Now make 9 replica's of Sheet1.xlsx and name them as Sheet2, Sheet3, Sheet4, .......... Sheet10
3. Open the sheet Consolidated.xlsm and see the button i have added called "Pull Data".
Now write down the code by adding a Module in that excel sheet from the code window.
4. Write a code that will open each of these sheets (Sheet1, Sheet2, Sheet3, Sheet4, .......... so on) one at a time and will copy the data from these sheets to the Consolidated.xlsm sheet.
5. Make sure that the data is appended(and not overwritten) from the multiple sheets (Sheet1, Sheet2, Sheet3). that is once you paste the data from sheet1 to Consolidated.xlsm then the Sheet2 data will be pasted at the end and after that sheet3 data will be pasted and so on..
6. In this way at the end we will have all the data from Sheet1, Sheet2, Sheet3...in the consolidated sheet.
7. The Division column in the Consolidated sheet will have the value of first row in these multiple sheets. So after making the replicas of Sheet1, please change the value in first row (Range A1) to any other value to avoid the confusion.
8. I have highlighted the data for two sheets in yellow and grey color in the consolidated sheet.
I have been trying to edit a code which previously saved a copy in a new workbook to a specific folder/path. (Additionally it copies and clears some figures, but this is working as it should.)
However I would like the copy to be saved at the same location as the original workbook, regardless of the path the original workbook is saved.
I.e if I need to move the workbook containing the code to a new folder/location, when using the macro, the new copy should be stored in the same folder/location as the original one.
For now it is only saving the copy into "My Documents"
Code: Sub Macro1() ' ' Macro1 Macro ' Macro recorded 16-02-2009 by ceng '
I have data in 2 different workbooks, and I need to transfer all data in 'Jx_ex1' to sheet1 in the 'template' workbook, and all data in 'Gr_ex1' to sheet2 in 'template' workbook. All data should be transferred to the same cell numbers, from A1 to Y5000. I actually have loads of workbooks to transfer to the template but if I have an example with the two then im sure I can work out how to modify it. All files will be in the same folder.
I'm trying to find a way to save a single sheet of an excel workbook and in the same process delete all vba code and shapes from the new single sheet workbook. I was looking around and found this code which does save only the single sheet to a new one sheet workbook but doesn't delete the vba and shape that I have used to assign macros to in the original.
Code: Sub SaveSheetAsNewBook() Dim wb As Workbook Dim InitFileName As String Dim fileSaveName As String Dim wshape As Shape InitFileName = ThisWorkbook.Path & Format(Date, "mm.dd.yy")
I'm trying to figure out a way to find a specific sheet in a workbook that does not contain the macro. Within the macro I have a cell which holds the name of the specific sheet I would like to find but I can't get it to work for some reason...
'Dim officen As Integer 'Dim thiswb As Workbook
officen = Range("A2").Value Set thiswb = ActiveWorkbook ' Open the Active Info file Workbooks.Open "C:My DcoumentsActive 20080616.xls", , , , "xxxxxx" ' Dim sourcewb As Workbook Set sourcewb = Workbooks.Open"Active 20080616.xls"
I have workbook having around 25 sheets and i want macro to merge all sheets except first (summary) in to last sheet ( mergedata ) inpute data will be start from cell A17 in all sheet. also sheets may be add or delete as per requirement. after merge data from sheet name should add after each entry .
I have a Picture in a workbook kept open. ( workbook 1 )And i have some X workbook open....i want a copy of sheet from workbook 1 To X workbook which is currently active.
i'm trying to get data added in one sheet of a workbook to automatically be entered into another sheet. such as a monthly, Quarterly and Annual balance sheet.
I'm looking for a formula that will paste an entire row from sheet 2 into sheet 1 of the same workbook when only 1 cell is typed.
I am trying to come up with a property access log for my guards so when they enter a tag number from(sheet 2 column B) into (sheet1 column D) , it will auto fill sheet1 column C and E with the entries from sheet 2 column A and C.
I have a userform which clones the latest sheet and produces copy of it on the next sheet. The first sheet they will be cloning is the sheet called 'template', I however want this to be hidden since I do not want anybody to modify a sheet which basically serves purpose of a template. And once cloned, it is no longer needed.
On the click of the command button, the macro will create sheet1 taking the info from sheet named 'Template' in the same workbook . And now on the next click of the command button, Sheet 2 is created taking the info from sheet1 and Sheet 3 is created taking the info from Sheet 2 and so on. Here is what I currently have, so how can i modify it in order for my scnerio to work?
I am wanting to create a macro for excel that when run it it will copy the active worksheet and worksheet named "Timesheet" and copy them to a new Excel workbook named the same as the original file + "JobBrief".
have a basic knowledge of VBA. The task I am trying to perform with VBA is to
1. Copy from sheet1 A1 to sheet2 E9 2. Copy from sheet1 B1 to sheet2 E11 3. Save sheet2 in a new workbook file with the file name cell data from sheet1 A1 (511894.xls) 4. Copy from sheet1 A2 to sheet2 E9 5. Copy from sheet1 B2 to sheet2 E11 6. Save sheet2 in a new workbook file with the file name cell data from sheet1 A2 (097219.xls) 7. Repeat the process down columns A and B to the end of the columns. 8. Columns A and B will end at the same time but the data and the last cell will change with each scan added to the columns.
This code will accomplish this task with a single column of data but not two columns. Also column B will have a mixture of numbers and letters in its cells, Column A is only numbers.
VB: Sub MoveData() sName = "temp" Const csPath As String = "C:Documents and SettingsmcgaulcDesktopTestFile" 'MyName = ActiveWorkbook.Name
[Code].....
Here are some images of the data sheet and the saved sheet
Sheet1.jpg Sheet2.jpg Note: sheet2 in image is "temp" sheet in code
A B C D E ------- so on. 1 P.O.# STYLE# ORD.QTY PRICE VALUE ............ etc... 2 P-150 ABT-5 500 $2.50 $1250.00.............etc 3 4 5 6 .... .... ..... goes on....
I have more than 1000 entries in an year
Now I need the following to be worked out in the next sheet
A B 1 P.O.# Here I have to select the P.O Nos what is entered in the data sheet 2 INVOICE NO Here the relevant Invoice No. for what I selected as above should apper 3 VALUE Same as above 6 AMT RECD 8 BALANCE TO RECEIVE
I would like to run a macro from a worksheet that creates a new workbook for each worksheet (there will be 20 plus) and saves it in a new folder i.e. all the same directory L/Utilisation/Team/name of the worksheet.
While in a workbook called "Main_Workbook.xls", I use a sub to open another workbook called "SecondWorbook.xls". Here's the code to do that:
Sub OpenWorkbook() ExcelFile = Application. GetOpenFilename(FileFilter:="Microsoft Excel Files(*.xls),*.xls", Title:="Choose an Excel file To open...") Workbooks.Open FileName:=ExcelFile End Sub
This works fine. When you view the workbooks in the Project Explorer you will see:
I have created a workbook with several subsheets for different departments in my company to fill in there respective data that feeds a main sheet that colates all the info. I've designed a macro that basically breaks the department sheets into seperate workbooks so that i can send them to the different people to complete. When the files return, I could sit there pasting the data back into the main workbook but really I would rather have a macro that overwrites the sheet in the main work book with the completed sheet of the same name.
Maybe I havent done this correctly, but when i try to move the sheet from the department workbook back to the main workbook it just creates a (2) copy. I want it to replace the sheet rather than create a copy.
I am trying to do a MS Query from another sheet in the same workbook
I created a new data source using Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)
Tried read only checked and unchecked
Workbook is a .xlxs but same error with .xlsm workbook Workbook is on the desktop
I receive the below error when trying to edit a MS Query table by right clicking Table>Edit Query
ODBC Excel Driver Login Failed
The Microsoft Access database engine cannot open or write to the file "(unknown)". It is already opened exclusively by another user, or you need permission to view and write its data.
I have a workbook that consists of 3 sheets, it's a template I use. Once I am done filling out sheet 3, I save as a new workbook. When I have to go back to the template workbook it always opens on sheet 3. Is there anyway that once I open the template workbook it will open on sheet 1?
I need to paste a worksheet into a different workbook. Can I paste it over a different sheet? For instance, I want to take a sheet and paste it as "Old Data" (sheet name) into a different workbook. The code I am trying is:
I have an excel workbook that contains 12 sheets.(ECN.xls). I have another workbook that contains 1 worksheet.(ExcelRows.xls). I have written a macro to Copy a range of values from ExcelRows.xls(ExcelRows is the Sheetname) to ECN.xls(ECN Number is the Sheetname). The macro is written in ECN.xls.