Separate data from each owner into separate sheet?

  • Re: Separate data from each owner into separate sheet?


    Xani,


    Here is an example where I filter data based on Column A (Column 1) based on certain names and then move the data to the respective worksheet. You can probably use this as a base and modify it as needed....


    Matt Mickle
    Using Excel 2010,2013 & 2016

  • Re: Separate data from each owner into separate sheet?


    Xani
    Pictures are of little value to those of us trying to help you. They are hard to read and we have no idea what comprises the data that is shown. Suggest you upload a sample workbook with a before and after scenario. In this manner, we can provide a working solution that is specific to your needs.

  • Re: Separate data from each owner into separate sheet?


    AlanSidman,


    I agree with u I try to upload photo but I dont know why size is small, Also I try to upload workbook but size is large !!

  • Re: Separate data from each owner into separate sheet?


    Ok I try to decrease size of workbook, Please find attached file.


    What I am planning to do is the following:


    To take specific columns from the data sheet and transfer it to each owner sheet in the below.


    Example: Engineering Department - User data owner data should be transfer to Engineering Department - User sheet.


    Columns needed:
    [TABLE="width: 1622"]

    [tr]


    [TD="class: xl64, width: 98"]Work Order
    [/TD]
    [TD="class: xl64, width: 351"]Description
    [/TD]
    [TD="class: xl64, width: 64"]Work Type
    [/TD]
    [TD="class: xl64, width: 64"]WO Status
    [/TD]
    [TD="class: xl64, width: 166"]Name
    [/TD]
    [TD="class: xl64, width: 108"]Target Start[/TD]
    [TD="class: xl64, width: 101"]Target Finish[/TD]
    [TD="class: xl64, width: 108"]Scheduled Start[/TD]
    [TD="class: xl64, width: 101"]Scheduled Finish[/TD]
    [TD="class: xl64, width: 108"]Actual Start
    [/TD]
    [TD="class: xl64, width: 108"]Actual Finish
    [/TD]
    [TD="class: xl64, width: 108"]WOCreationDate
    [/TD]
    [TD="class: xl64, width: 76"]Record ID
    [/TD]
    [TD="class: xl64, width: 61"]IncStatus
    [/TD]

    [/tr]


    [/TABLE]

  • Re: Separate data from each owner into separate sheet?


    try this vba solution


  • Re: Separate data from each owner into separate sheet?


    Dear All,


    I try to apply the above but I did not successed, Is it possible for someone to help me on my excel sheet?

  • Re: Separate data from each owner into separate sheet?


    I try to apply below code over my sheet, The problem is that it only copy the data of "OGA Shift - Department User" to separate sheet, but for "Mr Salman Hasan Alaradi" did not copy the data to his sheet, why is that happen?


    Sorry I could not upload my excel file due to size exceed current size allowed to upload excel files.


  • Re: Separate data from each owner into separate sheet?


    I do not understand what did not work with the code I supplied. It worked perfectly for me when I applied it to the sample workbook you supplied. When you say it does not work, that does not help me to diagnose what is your problem. Tell me specifically what happened and what did not happen. Did you get error messages? Did you place it in a new module? I am not a mind reader. Is your workbook not represented by what you supplied as a sample?

  • Re: Separate data from each owner into separate sheet?


    Try this


    Your sample workbook with code added and working is attached.

  • Re: Separate data from each owner into separate sheet?


    Hello,


    You can test code below :


    Attached is your sample workbook


    Hope this will help

  • Re: Separate data from each owner into separate sheet?


    KjBox,


    I checked your code with attached workbook, It worked with the current data, If i put the original data which it is a lot of rows it will highlight this code in yellow:


    Code
    With Sheets(yy(LBound(yy(0)))(i))



    Carim,


    Your code work , But I notice the following, After changing data with large data it will show additional sheets but without Project Manager Name, for example Sheet1, Sheet 2, Sheet 3 + The other problem is for example instead of having OGA Shift Department User in one sheet there is a lot of sheets differently but the owner is OGA Shift ! They should be all project manager same into one sheet , not separaetly.


    For example
    Project Manager A in one sheet
    Project Manager B in one sheet


    what happening is for example Project Manager A some rows and columns in one sheet, some of them in another sheets.

  • Re: Separate data from each owner into separate sheet?


    Hello,


    If you need the Owner to split use the Range("J") ...


    But if you need the Project Manager ... you have to use the Range("H") ...



    Hope this will help

    If you feel like saying "Thank You" for the help received, do not hesitate to click the "Smiley" icon, below, in the bottom right corner :)

  • Re: Separate data from each owner into separate sheet?


    Quote

    I checked your code with attached workbook, It worked with the current data, If i put the original data which it is a lot of rows it will highlight this code in yellow:


    What is the error message you get?

    We now have a reputation system in place. If my reply helped please "Like" the reply by clicking the "Like" icon at bottom right of my reply.

  • Re: Separate data from each owner into separate sheet?


    Try the attached version.


    I have modified the code and included an additional sheet named "Template" which holds the Headers for new sheets that will be created for each Project Manager. Make sure you add that sheet to your actual file, it can be hidden if you prefer.


    The code includes a Function to check if a Sheet already exists for a Project Manager, make sure you include that if you copy/paste the code to your actual file.


    the modified code is

  • Re: Separate data from each owner into separate sheet?


    Dear KjBox


    Thank you for the attachment, I checked your workbook and I got the following yellow error message.


    Code
    .[a2].Resize(UBound(oDic.Item(kee), 2), 14) = Application.Transpose(oDic.Item(kee))


    The steps I follow as the following:


    I copy my original data and paste it into Sheet 1. (I did not change or remove the headers existed in Sheet 1).


    Almost 8676 rows been pasted into Sheet 1.


    After running Macro I found split done for Yahya Splited, OGA Shift Splited, Anoop showing Empty Form, the rest did not split).


    After decreasing the amount of rows, it worked again.


    Kindly advise if I did any wrong.


    Note: I could not attach original data due to size limitation of website, even though after archive into Zip file still large as 2.67MB

  • Re: Separate data from each owner into separate sheet?


    Sometimes using Application.Transpose to transpose an array when placing the array contents onto a sheet directly fails for no explicable reason!


    This can be overcome by transposing the array before placing the array contents onto the sheet.


    Try changing the code to this, there is a slight modification to the Sub and a new Function.

    We now have a reputation system in place. If my reply helped please "Like" the reply by clicking the "Like" icon at bottom right of my reply.

  • Re: Separate data from each owner into separate sheet?


    KjBox,


    Thank you it worked perfectly, Just a simple question as I know it is separate by Project Manager Name, If I wanted to change it by myself to split by something else like for example WO Owner Name I should change which Line in Code ?


    This is only for my knowledge since I want to learn lol.

  • Re: Separate data from each owner into separate sheet?


    Currently the first part of the code is like this


    The Project Manager Name is in Column H of the worksheet (that is column index 8). To change to WO Owner Name the code will need to reference sheet column J, which is column Index 10.


    You will need to change 4 lines of the code to split by WO Owner.


    Change

    Code
    If Len(x(i, 8)) Then
        kee = oDic.Item(x(i, 8))


    to

    Code
    If Len(x(i, 10)) Then
        kee = oDic.Item(x(i, 10))


    and

    Code
    If x(ii, 8) = x(i, 8) Then


    to

    Code
    If x(ii, 10) = x(i, 10) Then


    and

    Code
    oDic.Item(x(i, 8)) = y


    to

    Code
    oDic.Item(x(i, 10)) = y

    We now have a reputation system in place. If my reply helped please "Like" the reply by clicking the "Like" icon at bottom right of my reply.

Participate now!

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