Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro programming for Creating New Sheets and Copying Data
I have a peculiar problem:
I have a data in one excel sheet which I would like to transfer to another excel sheet. The data in the original file (say F1) is in one single sheet and what I want is to copy this data into a new file (say F2) and that too in different worksheets based on a value in one column of F1. For Example: F1 has sheet 1 only with data in 8 columns and say about 500 rows.like Headers a KD LT LD NW HO SE TIME Data1 .................................................. ................1:1.................. The colum SE has data from 1:1 to 1:40 Now the what I need to do is create a new xls file F2 where a macro looks for a sheet name 1-1 if its there then copies all the rows with 1:1 to that sheet ...if the sheet is not there then tht macro shud create that sheet named 1-1 and so on. I need a macro for this as this data change every hour and there a 9 files in which there is data and so I need to create like 360 new work sheets with 1-1 to 1-40 , 2-1 to 2-40,...9-1 to 9-40. I hope some can help me out with this |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro programming for Creating New Sheets and Copying Data
Start with the code at this site:
Modify it to check if the sheet exists before creating it. http://www.rondebruin.nl/copy5.htm -- Regards, Tom Ogilvy "Addy" wrote: I have a peculiar problem: I have a data in one excel sheet which I would like to transfer to another excel sheet. The data in the original file (say F1) is in one single sheet and what I want is to copy this data into a new file (say F2) and that too in different worksheets based on a value in one column of F1. For Example: F1 has sheet 1 only with data in 8 columns and say about 500 rows.like Headers a KD LT LD NW HO SE TIME Data1 .................................................. ...............1:1.................. The colum SE has data from 1:1 to 1:40 Now the what I need to do is create a new xls file F2 where a macro looks for a sheet name 1-1 if its there then copies all the rows with 1:1 to that sheet ...if the sheet is not there then tht macro shud create that sheet named 1-1 and so on. I need a macro for this as this data change every hour and there a 9 files in which there is data and so I need to create like 360 new work sheets with 1-1 to 1-40 , 2-1 to 2-40,...9-1 to 9-40. I hope some can help me out with this |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Copying sheets in a macro | Excel Discussion (Misc queries) | |||
creating macro for copying the value from one cell | New Users to Excel | |||
Creating multiple sheets - new to programming | Excel Programming | |||
programming - copying and arranging selective data ...pls help....i know u can... | Excel Programming | |||
Creating an "update" button and using a macro to copy data from multiple sheets | Excel Programming |