Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copying sheets in a macro jhyatt Excel Discussion (Misc queries) 0 October 3rd 07 07:17 PM
creating macro for copying the value from one cell ananthu New Users to Excel 1 February 2nd 07 01:20 PM
Creating multiple sheets - new to programming Ivorh via OfficeKB.com Excel Programming 0 December 1st 05 10:53 PM
programming - copying and arranging selective data ...pls help....i know u can... kaichiew Excel Programming 0 November 3rd 04 08:18 AM
Creating an "update" button and using a macro to copy data from multiple sheets SPIRITTTJ Excel Programming 1 January 8th 04 05:50 PM


All times are GMT +1. The time now is 03:57 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"