Create Multiple Sheets
Jul 16, 2009
i have a master Sheet which have 15000 Entries (A:A15000) many are Duplicate, Unique is 63 . Now i want to make the 63 Sheets in a Same Workbook as per these Entries.
I record the Macro for the first 7 Sheets. Now how can I Modifiy this Macro to 63, Instead of record again for another Entries.
Actually, I have recevied a File some time it has 15000 Company Names sometime 20000 and sometimes 2000, Now i want to Make the Sheets according to Company Name Wise.
Now , i know how to record the Macro, but i want to know how to Modifiy the Macro.
" How to Learn and Modifiy the Macros"
My code
Sub CreateSheets()
'
' Macro1 Macro
' Macro recorded 7/16/2009 by AAditya
'
' Keyboard Shortcut: Ctrl+w
'
View 9 Replies
ADVERTISEMENT
Apr 14, 2014
The macro creates multiple charts from data in one sheet, but now when I'm trying to scale it up to multiple sheets, the previous charts created disappear. E.g Creates 5 charts for sheet 1 (can see them being created, using debugger mode), looping to the next chart and they are created but the first ones has disappeared! What am I doing wrong? I'm creating my chart by the following code:
[Code] .....
The startpoint variable is changed for every new chart within the one sheet and the outputsheet is changed when you change the sheet.
View 4 Replies
View Related
Apr 5, 2013
how to create multiple sheets ? in a workbook if i want to create multiple copies of the same sheet, what is the shortcut method to do that?
View 5 Replies
View Related
Mar 5, 2014
I got an employee list from couple of Site in different sheets it contains Employee name & Department but not a continued list, i.e.
on the attached file, i am looking to populate Summary Sheet, no of Sites, deparments & agents varies.
I want the Site, Department & Agent Name to Populate into one continues list without empty cells .
View 4 Replies
View Related
Mar 13, 2014
I have CASHBOOK Worksheet and I want to create a LEDGER Account in Multiple sheet
View 2 Replies
View Related
Mar 4, 2014
My boss requires me to prepare forms for vouchers that we release to our suppliers.
I encode the details manually to excel with his prescribed format. each voucher are encoded on separate sheets on one file.
Now he requires me to prepare a summary for all the voucher forms which is now becoming a pain since i now hold 50+ suppliers. and each day i encode about 120 vouchers.
I found through this forum that there is a way to automate tasks on excel like preparing a summary sheet.
View 3 Replies
View Related
Aug 19, 2009
I have data contained in matching cells from several sheets. I need a worksheet that reflect the summary of the data from the worksheets. No formula is required. I just want my summary worksheet to list the all the data from my other worksheets. I might end up having about a hundred worksheets that I need included in the summary. Attached is a sample. It would be better if the summary automaticaaly updates as new worksheets are added.
View 3 Replies
View Related
Dec 16, 2009
I need to combine the category sheets back into one main table, knowing that there may well be an increase in the number of categories, as well as the number of rows in each category sheet.
I have attached a sample workbook - if anyone can help me with the code so that when the macro is run, the data in sheets A, B and C are combined into Main Table.
the macro would also then update the Pivot table, that would be the icing on the cake (I have shown the pivot table configuration I need, in this case using only the data from sheet 'C', for reference)
View 6 Replies
View Related
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
Oct 1, 2007
I have a worksheet with a list of project managers and a bounc of data on them.
How can i make a new file with sheets for every project manager in the list and copy the data for each one into his own sheet ?
Every project manager has many lines (there are about 200 managers and 30 000 lines and 30 columns )
I have managed to create a sheets for project managers from a list of unique entries but that's all.
View 9 Replies
View Related
Aug 6, 2007
I am trying to use VB to create 50 charts each with 3 lines using data from 3 different excel spreadsheets in the same workbook. I am able to create one chart with 3 lines using data from the three spreadsheets, this is good. However I exprience problems when i try to insert a loop to create 50 charts that correspond the the rows in each spreadsheet. I am new to VB and am very inexperienced with VB. In each worksheet my data is arranged in rows. row 1 of each worksheet has the header information and rows 2 through row 50 have my corresponding data. for example A2 lists the name and F2 through T2 lists the data. I have tried a bunch of different things but nothing seems to alllow me to be able to create multiple charts which correspond to each row of data?
Sub Chart2PPT()
Dim arow As Integer
Dim acol As Integer
Dim StartPoint As Integer
Dim EndPoint As Integer
Dim rStartPoint As String
Dim rEndPoint As String
StartPoint = 2
EndPoint = 4
For arow = 2 To 5
rStartPoint = "f" & StartPoint
rEndPoint = "t" & EndPoint
Charts.Add
ActiveChart.ChartArea.Select
ActiveChart.ChartType = xlLine 'Type of graph........................
View 2 Replies
View Related
May 5, 2014
New to using Excel formula's and am trying to create an IF/LOOKUP formula to look at multiple sheets within a workbook and display the information within the 'compare' sheet.The yellow cells are where data will be entered.
What I am trying to achieve:
Type the store numbers on the compare sheet (B2 and D2). For the sheet attached I have put 190 (in B2) and 2012 (in D2)
B2 store shows the predicted and actual values of 190 in columns B & C
D2 store shows the predicted and actual values of 2012 in columns E & F
(No need to worry about variance and difference columns)
So, if I change the store numbers in B2 and D2 to any of the sheet numbers, I want it to display the correct info for that particular store within the compare sheet.
I have attempted a formula, which you can see... I have basically looked at some previous sheets that had IF and LOOKUP on it and tried to replicate that for my sheet, but with no luck.
View 3 Replies
View Related
May 13, 2013
I run into is that many of our staff don't know there are tabs at the bottom of the page that show different worksheets. writing some VBA code that would grab the names of all the sheets and create a single sheet with the tabs listed as buttons that would hyperlink to each sheet of it's given name. Kind iof an index for the sheets.
Also bonus if 3 rows could be insterted on each of those pages with a button that links back to the index page.
View 1 Replies
View Related
Feb 26, 2012
I have a workbook that updates from external source and creates sheets depending on a cell range.
I have put tab 1 and tab 0 on either end of where the new sheets will be inputted, will never know how many sheets
What i need to happen is if someone fills in "complete" in A7 in my "summary" sheet then the values in row 6 in all the other sheets get hardcoded. This needs to happen from A7 down to A26, so A8 = complete then copy row 7 etc
This is what i have so far
I get compile error here ........Sheets(ArrSh(1)).Activate
Also need it to work for all the other rows.
Sub hardcode()
'
'Sheets("Summary"). Select
If Range("a7") = "complete" Then
'
Sheets(Array("1", "0")).Select
Sheets(ArrSh(1)).Activate
[Code] ......
View 2 Replies
View Related
Aug 9, 2007
I have been running a simulation for about 18 hours now and just received:
Run-time error '1004':
Method 'Add' of object ' Sheets' failed
I have been creating new sheets, importing data, pulling some values from the data then deleting the respective sheet. I am using:
ActiveWorkbook.Sheets.Add after:=Sheets(Sheets.Count)
The sheet is actually being added to the workbook, seemingly before the error. I resume the code, and a new sheet is placed in the workbook and it errors again. The Debugger stops and highlights on the code above.The sheet count number was 10895 at the error, just as an indicator of how many times the simulation has performed successfully. I am hoping this is something I can fix without having to start over...
View 9 Replies
View Related
Feb 18, 2014
I have a work sheet named "Main_List"...In column D starting with "D2" I would like to list worksheets that I would like to have printed via VBA.
The workbook has several hundred worksheets and I would like to list in column D only worksheets that I would like to print with VBA code.
View 3 Replies
View Related
Dec 26, 2009
I have a workbook with 26 sheets, labelled A to Z. Column A in all the sheets have names from rows A6:A35.
I need a macro or a code to extract all the names from each of the 26 sheets and paste it to a new sheet 'Names' under column A, such that names starting with 'B' paste under all the names 'A' and so forth till 'Z'.
View 9 Replies
View Related
Feb 19, 2012
I've got data being scraped from a site, putting 1 new workbook in a folder each day
each workbook has 40 sheets in it.
i need to run 5 modules in sequence on a sheet then loop to the next sheet and run the same 5 modules.
ive writen all the modules, and can loop them through the sheets in sequence but i cant work out how to loop them through the each workbook in the folder..
is there an easy way to do this or can it not be done because it would need access to the folder that holds all the wordbooks which lives outside of excel on the desktop ?
View 5 Replies
View Related
Oct 16, 2009
I have this file, I would like to create a sheet for each different supplier code (column D), and each sheet named with the supplier code.
View 3 Replies
View Related
Jul 24, 2012
I have a worksheet titled "master plan" with many columns of data. I want to create many tabs based on this data.
One tab I want that just has the data from columns C, F, A, E, G and L (in that order) Starting with the header data in row 2. And titled "LOB".
Then I want a different tab for each unique item in Row C with these same columns (C, F, A, E, G and L from "master plan" tab or A, B, C, D, E and F from new "LOB" tab). The tab name should be the unique row C value.
So for example, say that there about 20 rows where 'A' is in column C, about 30 with 'B' in column 'C' etc .... There should be a tab with the name 'A' with those 20 rows of data and a tab with the name 'B' with the 30 rows with B and so on.
I also would prefer not to have to delete the existing 'A' and 'B' tabs every time before recording the macro so if it can either create a new tab or replace an existing tab with that name if it already exists.
To make things a little more difficult.. for the (in this example) 20 items with an 'A' in column C, there are (at this time) 3 different possible items in column B of 'master plan'. I'd like to create 3 separate tabs for each unique value in column B and I want the name to be dependent on the data in Column B (for example, the three unique items in column B with a column C of 'A' are Red, Green and yellow. I want three new tabs set up for each and the tab names to be: if B = Red, then tab name = 'Stop', If B = Green, then tab name = 'Go', if B = Yellow, then tab name = 'Slow'.
I have something that partially works, but I have to create the 'LOB' tab first and it doesn't work if any of the sheets already exist. And it doesn't do the Red, Green, Yellow part.
Here is what I currently have:
Sub DeptTabs2()
Dim strSrcSheet As String
Dim rngSrcStart As Range
Dim rngSrcEnd As Range
Dim rngCell As Range
Dim strLastDept As String
Dim intDestRow As Integer
On Error GoTo ErrHnd
[Code] ..
View 6 Replies
View Related
Feb 26, 2008
This is more acedemic than anything, but I'm trying to create a range that refers to ranges on more than one sheet... is this possible? "Union" doesnt appear to work when the ranges are on different sheets. Netither of the Set My_Range3 statements work below.
Option Explicit
Public Sub test()
Dim My_Range1 As range
Dim My_Range2 As range
Dim My_Range3 As range
Set My_Range1 = Worksheets(1).range("A1:A10")
Set My_Range2 = Worksheets(2).range("B1:B10")
'Set My_Range3 = Union(My_Range1, My_Range2)
'Set My_Range3 = range(My_Range1, My_Range2)
My_Range3.Interior.ColorIndex = 3
End Sub
Both Set My_Range3 statements will work if the ranges are on the same worksheet.
View 4 Replies
View Related
Jul 2, 2014
I have attached a test workbook excel 2010 (ignore ref# errors, I've cut the workbook down for uploading purposes) What I would like to do is have a 'Button' on my 'information Sheet' which when clicked would clear certain cells. I have searched the forum but can't find a solution, everyone seems to want to delete rows or columns but I just want to clear certain cells. The workbook will have 11 sheets each named 'caravan 1' through to 'caravan 11' The uploaded test workbook only only has 3 sheets.
On 'caravan 1' (which is slightly different to the other 10) I want to clear the content of cells
B4 & B5
C4, C22 & C41
D4 & D5
E4,E5, E22,E23,E41 &E 42
On all other 'Caravan sheets' I want to clear the contents of cells
D4 & D5
E4, E5, E22, E23, E41 & E42
It would be icing on the cake if it could give a warning such as " are you sure you want to clear these cells" but that isn't really necessary. The worksheets will be password protected, but the cells mentioned above will not be. If it proves too difficult to clear all the cells on all the sheets with one click, then perhaps a simpler solution might be to have a button on each sheet instead
View 8 Replies
View Related
Feb 22, 2013
I want to make a mirror copy of worksheet so that i can use filter option more than one names for the same column and for same sheet.
View 5 Replies
View Related
Mar 28, 2014
We have A,B,C,DE scenarios and we need to create 6 sheets for all the scenarios and a "Result" sheet in the spreadsheet:
ATC1.....ATC6 - All A in Black colour
BTC1.....BTC6 - All B in Yellow colour
CTC1.....CTC6 - All C some Light Blue
DETC1.......DETC6 - All D some Light Grey
Results - This will be Green color
I did a manual work around by recording a macro:
Create Sheet
Rename as ATC1
Coloured sheet as mentioned above.
Copy paste for each sheet name which will be around 25 times of the below code snippets but ofcourse change colour and change sheet names.
View 2 Replies
View Related
May 12, 2009
Every day i create a attendence sheet with names, who was attening a club the last 21 days.
I need some kind of report showing who is in Sheet1(Today) and not in Sheet2(Yesterday)="new people" and who is in Sheet2 but not in Sheet1 (people that stoped attending, droped out the list).
I tryed with "countif" and "Vlookup" but have to change the formulars on two sheets every day and i would rather like to leave leave the Sheets untouched.
View 7 Replies
View Related
Nov 11, 2011
Sub Macro2()
Dim stgSheets As String, Cnt As Long
Dim arrSheets()
Cnt = Sheets.Count
ReDim arrSheets(Cnt - 1)
For i = 1 To Cnt
stgSheets = stgSheets & Sheets(i).Name
arrSheets(i - 1) = stgSheets
'sSheets = sSheets & "", ""
Next i
[Code]...
View 2 Replies
View Related
Mar 1, 2012
I have a macro that creates sheets from a list of names. I have a template which is copied.
Sub CreateSheetsFromAList()
Dim MyCell As Range, MyRange As Range
Dim MySheetName As String
[Code]...
Sometimes I have to update that name list.
What I need is to have some addition that checks if the sheet does exist, if it does I want to skip and move on to the next name.
View 3 Replies
View Related
Mar 25, 2014
result of command is like below:
Code:
Entity,DATE,A_C,A_N,A_T,A_C,N_C,PER
YYY,24/03/2014,222 , 0002,ALARM TEXT DIFFER IN TIMEFORMAT , 1, 1,3.03030303
YYY,24/03/2014,333 , 0001,SCRIPT FAILED , 31, 6,93.9393939
YYY,24/03/2014,111 , 0003,ALARMS NOT RECEIVED , 1, 1,3.03030303
Entity,Sub-E,DATE,A_C,A_N,A_T,A_C,N_C,PER
YYY,9999992867290,24/03/2014 ,333 , 0001,SCRIPT FAILED , 7, 1, 100
YYY,9999992813525,24/03/2014 ,333 , 0001,SCRIPT FAILED , 3, 1, 100
[code].....
Now I'm looking is when opened in Excel, it should create a two sheets excel file 1) with the First Section and the 2nd with second section . based on headers included in file.which then will be used for PivotCharts..in 2nd stage of automating..
View 3 Replies
View Related
Nov 22, 2007
I have a workbook with a main worksheet "template", from which other sheets are created. Each worksheet has a specific value found in cell D8.
I want to collect the values found on each worksheet (in cell D8) and list them on the first sheet.
View 3 Replies
View Related
Aug 11, 2014
I am trying to create a formula which looks in 1 cell to determine 'IF' it states either "BUTT CUT" or "DIE CUT" and then does a VLOOKUP in a table array for each which ever column relates to asnwer to 'IF statement.
This is as far as I have got but even this won't work:
=IF(I15="BUTT CUT",=VLOOKUP(J15,V13:Z22,2,FALSE))
View 7 Replies
View Related