Row Data Covert To Column date wise

  • Hi,


    I need to convert row data to column accordingly date wise. I have attached work book for reference and easy understand.
    In Column A is date and it will go no of rows .
    In Column K Is Name and it will go accordingly date.


    In Column AK Data will transfer to row basis accordingly to name Vs date.
    I have made code below to avoid duplicate names only .so kindly add for changes in result sheet Accordingly to transfer .
    I hope this clear.if any one will help me it will more useful for me.
    Thanks in Advance.







  • Re: Row Data Covert To Column date wise


    Try this:-
    Data "Sheet2", Results sheet "Result"


  • Re: Row Data Covert To Column date wise


    An alternative approach:



    Note: This sorts the Operator Names alphabetically before placing them in Result table and leaves out any entries for "No Load".
    If you do not want the names sorted alphabetically then remove :ALOp.Sort from the code.
    If you still need "No Load" to be recorded then change


    Code
    If x(i, 11) <> "No Load" And Not ALOp.contains(x(i, 11)) Then ALOp.Add x(i, 11): ALOp.Sort


    To

    Code
    If Not ALOp.contains(x(i, 11)) Then ALOp.Add x(i, 11): ALOp.Sort

    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: Row Data Covert To Column date wise


    Dear Sirs,
    Thanks for reply and spend your valuable time for me.
    Mr.MickG your code is working fine but only thing is the date is not coming correct .( I have attached work book)
    Mr.KjBox your code is good what i am expecting with border lines and serial no .but only thing is working only two days only.I need to increase many dates.


    One more thing I found if same date same name is there then value will come in average.
    I hope both of you will understand my problem.
    Once more thanks for spend your valuable time for me.


    Thanks.
    God_karthi

  • Re: Row Data Covert To Column date wise


    I have edited the code in my last post, this will accommodate any number of dates and if an Operator name appears twice or more for the same date then the highest value is recorded.


    Note I have also added Sort for the names and omitted "No Load" from the recorded data, see the notes at the end of that post about not wanting names sorted and/or "No Load omitted.


    Leave the Dates being sorted though, it just corrects the possibilty of dates not being in order in the main data table and places them in ascending order in the Result Table.

    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: Row Data Covert To Column date wise


    Just read your last post again, do you mean you want an average if same date and name occurs more than once?


    What about when one of those is empty? Do you still want to average cells with a value AND the empty cell (value of that would be 0)?

    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: Row Data Covert To Column date wise


    Thanks sir for reply.


    I need if same date with same person then i need average otherwise same data will come.
    if some time is blank then I need as it is blank.
    Note: only thing is need average if any value.



    like below I mention:


    case 1:
    1-5-15 A 45
    1-5-15 A 100 result is 72.5


    Case 2:


    1-5-15 A 45
    1-5-15 A result is 45


    case 3:


    1-5-15 A 45
    result is 45


    case 4:


    1-5-15 A
    result is


    I hope you will understand what I need.this thing I need date wise accordingly.


    Thanks in advance


    god_karthi

  • Re: Row Data Covert To Column date wise


    This will ignore empty cells when calculating average


    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: Row Data Covert To Column date wise


    Thank you sir perfect working what i need exactly data is coming thanks for your help.
    column A is not coming border how I could add.If not possible then Not a issue.
    But thanks for you valuable help for me.
    Thanks,
    God_karthi

  • Re: Row Data Covert To Column date wise


    I left the border out of Column A because that is how it was in your sample file.


    To have borders around all the cells in the table change


    Code
    .Offset(, 1).Resize(, .Columns.Count - 1).Borders.Weight = 2


    To

    Code
    .Borders.Weight = 2

    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: Row Data Covert To Column date wise


    You're welcome

    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!