+ Reply to Thread
Results 1 to 12 of 12

VB Code to rearrange data

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

    VB Code to rearrange data

    Hello:

    Please refer to attached file.
    I will have data as shown in Column A.
    I need VB Code to reaaarnge the data in column B thru D.
    I have shown some manually what needs to be accomplished.
    Data needs to be done until -------END REPORT------- in column A

    Let me know if you have any questions.
    Thanks.
    Attached Files Attached Files

  2. #2
    Forum Guru karedog's Avatar
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,971

    Re: VB Code to rearrange data

    Maybe :
    Please Login or Register  to view this content.
    1. I care dog
    2. I am a loop maniac
    3. Forum rules link : Click here
    3.33. Don't forget to mark the thread as solved, this is important

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

    Re: VB Code to rearrange data

    Hello kareDog:

    Seems to work but need to go thru each row until End of Report.
    So need to fill up Cells B20:D140
    I am sorry i may have not explained you properly.

    Please refer to attached file.
    Let me know if you have any questions.
    Thanks.

    R
    Attached Files Attached Files
    Last edited by rizmomin; 04-23-2018 at 02:51 PM.

  4. #4
    Forum Guru karedog's Avatar
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,971

    Re: VB Code to rearrange data

    Hi Riz,
    Not too sure, but try this :
    Please Login or Register  to view this content.
    Attached Files Attached Files

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

    Re: VB Code to rearrange data

    Hello Karedog:

    Thanks a lot, this is what I wanted.
    Please refer to attached file.
    Sheet1, at the bottom i have added total hours for the employee and those needs to be extracted as shown in Green highlighted.
    So basically the data will be "*** END CLEAR REPORTS ***"

    Let me know if you have any questions.
    Thanks.




    Riz
    Attached Files Attached Files
    Last edited by rizmomin; 04-24-2018 at 09:19 AM.

  6. #6
    Forum Guru karedog's Avatar
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,971

    Re: VB Code to rearrange data

    Hi Riz, try :
    Please Login or Register  to view this content.

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

    Re: VB Code to rearrange data

    Hello Karedog:

    Great, it works beautifully.
    Probably last request for this thread.
    Please refer to attached file,Sheet3
    You see Hours for employees from row 153 down.
    I need more rearrange here as follows:
    Refer to Sheet3 of attached.
    In this case, example, Need date next to employee name and sum of say C159:C161 in cell D157 and sum of D159:D161 in cell E157 and so on as shown.
    Once this is done, need to summarize Total Hours for employees as shown in column G to I


    Let me know if you have any questions.
    Thanks a lot for great help.

    Riz
    Attached Files Attached Files

  8. #8
    Forum Guru karedog's Avatar
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,971

    Re: VB Code to rearrange data

    Should be :
    Please Login or Register  to view this content.

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

    Re: VB Code to rearrange data

    Hello KareDog:

    Thankssssssssssssssssssss a lot, it works.
    After studing, i thought of couple of small issues/corrections.
    Is there a way to change the code to :

    1 . Paste each employee data at column B on the same row number as *** END CLEAR REPORTS *** instead of at column G:J
    2 . Also can you help change the format of HOURS to digit form instead of hours:mm (So say if it is 2:30 then this will be 2.5)

    Once again i am very sorry if i am asking little extra and i hope this is not confusing

    Thanks a lot

    Riz

  10. #10
    Forum Guru karedog's Avatar
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,971

    Re: VB Code to rearrange data

    If I understand it correctly :
    Please Login or Register  to view this content.

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

    Re: VB Code to rearrange data

    Hello kareDog:

    You are absolutely amazing, thanks a lottttttttttttt.
    Will surely keep you in mind if any further in this project if it is ok with you.

    Riz

  12. #12
    Forum Guru karedog's Avatar
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,971

    Re: VB Code to rearrange data

    You are welcome, thanks for the reps, and don't forget to mark the thread as solved.

    And if you have any further modification, just make it quick (in one or two days), because I have a forgetful mind, re-reading the code is like I haven't see the code before, even the code is made by me myself.

    Regards

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Code needed to rearrange data Base on 2 criterias
    By antonio32 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-16-2017, 03:36 PM
  2. [SOLVED] Code needed to rearrange data
    By antonio32 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-16-2017, 12:55 PM
  3. [SOLVED] VB Code or formula to rearrange data
    By rizmomin in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-04-2017, 07:35 PM
  4. [SOLVED] VB Code to rearrange the data
    By rizmomin in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-29-2016, 06:12 AM
  5. VBA code to collect and rearrange data coming from pivot table
    By vio.coman in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-02-2016, 02:56 AM
  6. [SOLVED] VBA code to rearrange data into multiple columns
    By shinobi in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-14-2013, 06:33 AM
  7. [SOLVED] Getting Error 1004 Object or Application Defined Error - Code to rearrange data
    By BlazzedTroll in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 06-10-2013, 12:10 PM

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