Macro: Create Sheets, Copy Data According To a Cell Value

  • HI Friends,


    Please go through the attached work book… in one Sheet there is data and in F column are the timings... I need a macro… when I run the macro.. I want to create work sheet based in the shift time and copy entire row related to that shift time of all the cell to that particular sheet… there may be multiple rows related to same shift time but remaining data may be different.. Please help me to create a macro.


    Regards,
    Sharan

  • Re: Macro To Create Work Sheets And Copy Data According To Cell Value In Main Sheet


    Why not use [af]*[/af] or [advf]*[/advf] or [pt]*[/pt]


    Excel VBA & AutoFilter AutoFilter provides us with a MUCH faster alternative to loops of all kinds


    Excel VBA AutoFilter Criteria How to add the criteria for AutoFilter in VBA.


    Excel VBA AutoFilter Dates Using dates in AutoFilter can be tricky if not using the US date format.


    Create Worksheets for Each Item in an Excel Table of Data I'm often asked how one could create x number of Worksheets where each one houses the data specific to each item in a table. The task at hand is to create 1 Worksheet for each item (named as the item) and have all associated data on it.

  • Re: Macro To Create Work Sheets And Copy Data According To Cell Value In Main Sheet


    Hi Roy:


    As the data is too big it takes lot of time to create sheets and copy data from one sheet to several sheets manualy... so i asked that if it can save my time..


    Thanks
    Regards

  • Re: Macro To Create Work Sheets And Copy Data According To Cell Value In Main Sheet


    Hi Roy:


    i think you did not understand my requirements.. i know how to use AutoFilter or AdvancedFilter or Pivot Tables........ but it can not be automized to create worksheets based on the cell value and copy data accordingly right?


    please help me if you can...


    thanks
    Sharan

  • Re: Macro To Create Work Sheets And Copy Data According To Cell Value In Main Sheet


    Why bother a PivotTable will display what you want without creating unnecessary sheets?

  • Re: Macro To Create Work Sheets And Copy Data According To Cell Value In Main Sheet


    Sharan


    Wrong.


    It can be automated.


    I have advanced filter code that will filter to


    New worksheets.


    New workbooks.


    Existing worksheets.


    Existing workbooks.


    Worksheets with existing data.


    etc


    The only problem with your data is the lack of a headers/field names.


    Oh, wait a minute I wonder what this file does?


    AdvFilterNoFieldsToTemplateWB.xls

  • Re: Macro To Create Work Sheets And Copy Data According To Cell Value In Main Sheet


    Roy:

    But creating sheets is my requirement.. i need to work based on the sheets created.. hope it is posible

    thanks
    Sharan

  • Re: Macro To Create Work Sheets And Copy Data According To Cell Value In Main Sheet


    Norie:


    Don’t worry about the headers consider the column "F" which has time formats... I need to work on the same..


    Thanks
    Sharan

  • Re: Macro To Create Work Sheets And Copy Data According To Cell Value In Main Sheet


    HI Norie, Thanks for trying


    Your macro is giving some errors.. and thie does not serve mt purpose.. i need actuel macro for th workbook attaced.


    Thanks
    Sharan

  • Re: Macro To Create Work Sheets And Copy Data According To Cell Value In Main Sheet


    Sharan


    I didn't say the code would work with your data or even run without error.


    It's an example - I thought you could maybe study it and see if you could adapt it for your needs.


    It's a bit much to straight out ask for a complete solution.:)


    I could probably give you one but at the moment I don't have the time.

  • Re: Macro To Create Work Sheets And Copy Data According To Cell Value In Main Sheet


    I Agree that sir... i am sorry if i have written something wrong...i will surely study that.. however if you could get me the actual code... i would be greatfull to you..


    thanks
    Sharan

  • Re: Macro To Create Work Sheets And Copy Data According To Cell Value In Main Sheet


    Hi Sharan,


    Let me see if Ive got this right you want to create a new worksheet for each split time, named after the split time. Then for EACH split time copy the data onto the appropriate sheet.


    Sam

  • Re: Macro To Create Work Sheets And Copy Data According To Cell Value In Main Sheet


    Quote from tosharan

    I Agree that sir... i am sorry if i have written something wrong...i will surely study that.. however if you could get me the actual code... i would be greatfull to you..


    thanks
    Sharan


    He gave you the code in the example workbook attached to his post...that is the only code he is going to give to you because he doesn't have time to DO IT FOR YOU.


    So...like you said..."i will surely study that"...well...maybe you should STUDY the code he attached for you as an example...

  • Re: Macro To Create Work Sheets And Copy Data According To Cell Value In Main Sheet


    Its messy and not very methodical but hey if it works why not.


    So Try This:



    Regards,
    Sam

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!