+ Reply to Thread
Results 1 to 34 of 34

Transpose Data from Sheet1 to Sheet2

  1. #1
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    Transpose Data from Sheet1 to Sheet2

    Hello:

    Please refer TO ATTACHED EXCEL FILE.
    (Earlier i had different requirement)

    Sheet1 shows Clockin_ClockOut info for employees.

    I need these data to be transpose in format shown in Sheet2.

    VB macro or formula would work for me.

    Please let me know if any questions.

    Thank you

    Riz Momin
    Attached Files Attached Files
    Last edited by rizmomin; 06-02-2013 at 09:04 AM.

  2. #2
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Transpose Data from Sheet1 to Sheet2

    Hi Rizmomin,

    See the attached file and click on the blue button where I used below macro code:-

    Book3.xlsm
    Please Login or Register  to view this content.
    Regards,
    DILIPandey
    <click on below * if this helps>
    DILIPandey, Excel rMVP
    +919810929744 (India), +971528225509 (Dubai), [email protected]

  3. #3
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Transpose Data from Sheet1 to Sheet2

    Another option
    Attached Files Attached Files

  4. #4
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    Re: Transpose Data from Sheet1 to Sheet2

    Hello DilipP & AB33:

    Both solution will work for me.
    Thank you so much to both of you for your great help.

    Riz Momin

  5. #5
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    Re: Transpose Data from Sheet1 to Sheet2

    Hello DilipP :

    Both solution will work for me.

    If my data in Sheet1 is moved to O47 (Current cell referance is C1), what modification would i need to do to code.

    Please let me know if any questions.

    Thank you

    Riz Momin
    Thank you so much to both of you for your great help.

    Riz Momin
    Last edited by rizmomin; 06-02-2013 at 08:05 AM.

  6. #6
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    Re: Transpose Data from Sheet1 to Sheet2

    Hi DilipP :

    I figured it out, thanks a lot.
    Change C2 to the position of the cell.

    Riz Momin

  7. #7
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    Re: Transpose Data from Sheet1 to Sheet2

    Hi DilipP :

    I figured it out, thanks a lot.
    Change C2 to the position of the cell.

    Riz Momin

  8. #8
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Transpose Data from Sheet1 to Sheet2

    You are welcome momin.... cheers


    Regards,
    DILIPandey
    <click on below * if this helps>

  9. #9
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    Re: Transpose Data from Sheet1 to Sheet2

    Hi AB33:

    I like your code.
    Couple of questions, i have for your code.
    If my data in Sheet1 is moved to O47 (Current cell referance is C1), what modification would i need to do to code.
    Your code is limited to 7 rows, instead i want the code to work for all clockin-Clockout.
    Some days i will have 6 employees and some days it could be 13.
    So basically need to check data until employee filed is blank.

    Also i need the value pasted since the source has formulas and data at source is calculated.

    Please help and let me know if any questions.

    Thank you

    Riz
    Last edited by rizmomin; 06-02-2013 at 10:00 AM.

  10. #10
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Transpose Data from Sheet1 to Sheet2

    Riz,
    Okay!
    I am off site now and will back in few hours.

  11. #11
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    Re: Transpose Data from Sheet1 to Sheet2

    Hi AB33:

    Thank you..

    please refer to attached sheet.

    Let ME KNOW IF ANY QUESTIONS.

    Riz Momin
    Attached Files Attached Files

  12. #12
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: Transpose Data from Sheet1 to Sheet2

    Try this.
    Change "Sheet1" and "C1" to your reference.
    Please Login or Register  to view this content.

  13. #13
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    Re: Transpose Data from Sheet1 to Sheet2

    Hi Jindon:

    When i run the above macro with my sheet, It gives Runtime error 1004.
    When i debug it highlights
    Please Login or Register  to view this content.
    My data is in sheet called : "Daily_Receipt" and 5/1/2013 is in cell O47
    Data range would be O47:EG78. This will be for the whole month.
    Above and below this range, there will be some other data which i am not interested.

    I want to paste full month of data at A2 in Sheet "EmpClock" instead of creating a new sheet.
    Also want to make sure that the data pasted is the paste.special value. (Source data has formulas)

    Please LET ME KNOW IF ANY QUESTIONS.

    Thank you

    Riz Momin
    Last edited by rizmomin; 06-02-2013 at 12:15 PM.

  14. #14
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: Transpose Data from Sheet1 to Sheet2

    Try change
    Please Login or Register  to view this content.
    to
    Please Login or Register  to view this content.

  15. #15
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    Re: Transpose Data from Sheet1 to Sheet2

    Hi Jindon:

    It still gives RUntime Error.
    I am using below code

    Please Login or Register  to view this content.
    Please help

    Riz Momin
    Last edited by rizmomin; 06-02-2013 at 12:26 PM.

  16. #16
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: Transpose Data from Sheet1 to Sheet2

    If the sheet doesn't look like the attached, need to see your data layouts.
    Attached Files Attached Files
    Last edited by jindon; 06-02-2013 at 12:43 PM.

  17. #17
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    Re: Transpose Data from Sheet1 to Sheet2

    Hi jindon:

    My file is too big to show you (8MB).
    The data you have showed is exactly like i have in my sheet.
    I just noticed that if I manually go into "Daily_Receipt" sheet and select the data to copy, after leaving that sheet, the paste icon is greyed out, so i can't manaully paste.
    This could be the reason why it is not working for me.

    Please help and let me know if any questions.

    Thank you

    Riz Momin

  18. #18
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Transpose Data from Sheet1 to Sheet2

    It is not fast as Jindon's code
    Attached Files Attached Files

  19. #19
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: Transpose Data from Sheet1 to Sheet2

    What kind of Error and which line?

  20. #20
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: Transpose Data from Sheet1 to Sheet2

    Quote Originally Posted by rizmomin View Post
    Hi Jindon:

    When i run the above macro with my sheet, It gives Runtime error 1004.
    When i debug it highlights
    Please Login or Register  to view this content.
    Try delete that line
    Please Login or Register  to view this content.

  21. #21
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    Re: Transpose Data from Sheet1 to Sheet2

    Hi Jindon:

    Sorry i was out of town and just got back.
    Please refer to the attached sheet which i use your code and see the error, it is giving.
    Please help and let me know if any questions.

    Thank you

    Riz Momin
    Attached Files Attached Files

  22. #22
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: Transpose Data from Sheet1 to Sheet2

    I can not open your file saying

    "Found problem that might give serious damage to your computer"

  23. #23
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    Re: Transpose Data from Sheet1 to Sheet2

    Hi:

    I am not sure why it would not open at your end.
    Its opening fine with me.
    I have attached the code and the error line.
    Let me tell you that the code worked for couple of times and gave the error when new data is pasted.

    Right now the error is at

    Please Login or Register  to view this content.
    and when you hoover over the value it gives <<Subscript out of Range >>
    in above code, the value of n=931
    Could be that value is not resetting when macro is run again.


    Please have a look and let me know ..
    I really appreciate your help.

  24. #24
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: Transpose Data from Sheet1 to Sheet2

    Then try chnge
    Please Login or Register  to view this content.
    to
    Please Login or Register  to view this content.
    and let's see...

  25. #25
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    Re: Transpose Data from Sheet1 to Sheet2

    Hi jindon:

    Still same problem.
    The value of n=931

    Please help and let me know if any questions.

    Thank you

    Riz Momin

  26. #26
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    Re: Transpose Data from Sheet1 to Sheet2

    Hi Jindon:

    Please find attached 2 screen shot.
    Let me know if any questions.

    Thank you

    Riz Momin
    Attached Images Attached Images

  27. #27
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: Transpose Data from Sheet1 to Sheet2

    Hi Riz
    Try to change the Jindon's code (if Jindon does not mind)
    as applied at the file 'Employee-ClockinOut.xls‎'
    Please Login or Register  to view this content.

  28. #28
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    Re: Transpose Data from Sheet1 to Sheet2

    Hi Nilem:

    Thank you so much for your great help.
    It works but 1 problem.
    When i run the macro, it deletes the source data..i do not want that.

    Please help and let me know if any questions.

    Thank you

    Riz Momin

  29. #29
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: Transpose Data from Sheet1 to Sheet2

    I said if your sheet looks exactly the same as my last uploaded sheet....

    Change
    Please Login or Register  to view this content.
    to
    Please Login or Register  to view this content.

  30. #30
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    Re: Transpose Data from Sheet1 to Sheet2

    Hello jinDon and Nilem:

    I have modified the code as below and works like a charm.

    Please Login or Register  to view this content.
    I am very grateful to both of you for your time affort.
    Thank you so much

    Riz Momin

  31. #31
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    Re: Transpose Data from Sheet1 to Sheet2

    Hi Nilem & JIndon:

    I am seeing the same problem again as earlier.
    It works for some time and then it gives "Runtime error" as earlier.

    Please help and let me know if any questions.

    Thank you

    Riz Momin

  32. #32
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: Transpose Data from Sheet1 to Sheet2

    maybe change this line
    Please Login or Register  to view this content.
    or show a file in which the error occurs

  33. #33
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: Transpose Data from Sheet1 to Sheet2

    If you don't follow my suggestion, don't bother.

  34. #34
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    Re: Transpose Data from Sheet1 to Sheet2

    Hi Jindon & Nilem:

    Sorry for the confusion.
    I have cleared and started all over again and looks like it looks now.
    I am very grateful for your help.

    Thank you

    Riz Momin

+ 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