+ Reply to Thread
Results 1 to 2 of 2

Macro programming for Creating New Sheets and Copying Data

  1. #1
    Addy
    Guest

    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 are:

    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. #2
    Tom Ogilvy
    Guest

    RE: 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 are:
    >
    > 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 to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1