+ Reply to Thread
Results 1 to 10 of 10

VB Code to clean up Payroll Data by deleting rows

  1. #1
    Forum Contributor
    Join Date
    01-31-2012
    Location
    Georgia
    MS-Off Ver
    Excel 2010
    Posts
    193

    VB Code to clean up Payroll Data by deleting rows

    Hello:

    Please refer to attached file.
    I have data as shown in Sheet1 and it needs to be transformed as shown in Sheet2

    Basically, need VB code to look for ", in Column B,\
    if Found then copy Data from next row column C into Column C above arow

    In this case I would copy Cell C3 to Cell C2
    So now you have B2 = Name of employee, C2= Amount $2500 and D2 = 03/31/20

    And this needs to go thru the whole sheet and delete the rows in between

    I have shown completed manually in Sheet2.

    Please let me know if you have any questions.
    Thanks.

    R




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

  2. #2
    Forum Expert
    Join Date
    12-10-2006
    Location
    Sydney
    MS-Off Ver
    Office 365
    Posts
    3,527

    Re: VB Code to clean up Payroll Data by deleting rows

    Hi rmomin,

    Here's one way:

    Please Login or Register  to view this content.
    Regards,

    Robert
    ____________________________________________
    Please ensure you mark your thread as Solved once it is. Click here to see how
    If this post helps, please don't forget to say thanks by clicking the star icon in the bottom left-hand corner of my post

  3. #3
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,308

    Re: VB Code to clean up Payroll Data by deleting rows

    Another Option...
    Please Login or Register  to view this content.
    Last edited by sintek; 01-05-2022 at 02:10 AM.
    Good Luck
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the star to left of post [Add Reputation]
    Also....add a comment if you like!!!!
    And remember...Mark Thread as Solved.
    Excel Forum Rocks!!!

  4. #4
    Forum Contributor
    Join Date
    01-31-2012
    Location
    Georgia
    MS-Off Ver
    Excel 2010
    Posts
    193

    Re: VB Code to clean up Payroll Data by deleting rows

    Hello

    Thanks to both, it works

    R

  5. #5
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,308

    Re: VB Code to clean up Payroll Data by deleting rows

    Glad I could contribute...

  6. #6
    Forum Contributor
    Join Date
    01-31-2012
    Location
    Georgia
    MS-Off Ver
    Excel 2010
    Posts
    193

    Re: VB Code to clean up Payroll Data by deleting rows

    Hello Guys:

    Hello:

    Looks like I will need help in changing previosly done macro as it is malfunctioning.

    Please refer to attached file.

    Here Look for character "," in column D.
    If Found then the value in 1 row below to the row with the "," and then copy the whole row in Sheet2


    Let me know if you have any questions.
    Thanks.

    R
    Attached Files Attached Files

  7. #7
    Forum Contributor
    Join Date
    01-31-2012
    Location
    Georgia
    MS-Off Ver
    Excel 2010
    Posts
    193

    Re: VB Code to clean up Payroll Data by deleting rows

    Hello Trebor or sintek

    Or any other exceler, can you help.

    Thanks

    R

  8. #8
    Forum Expert
    Join Date
    12-10-2006
    Location
    Sydney
    MS-Off Ver
    Office 365
    Posts
    3,527

    Re: VB Code to clean up Payroll Data by deleting rows

    Looks like I will need help in changing previosly done macro as it is malfunctioning.
    It's not that the codes are malfunctioning but your requirement (data layout) has changed

    See how this goes:

    Please Login or Register  to view this content.

  9. #9
    Forum Contributor
    Join Date
    01-31-2012
    Location
    Georgia
    MS-Off Ver
    Excel 2010
    Posts
    193

    Re: VB Code to clean up Payroll Data by deleting rows

    Hello Trebor

    Thanks a lot, if any thing change i will let you know.

    R

  10. #10
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,308

    Re: VB Code to clean up Payroll Data by deleting rows

    As Trebor says...Complete different data setup...
    Please Login or Register  to view this content.
    Last edited by sintek; 01-08-2022 at 10:52 AM.

+ 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] VB Code to clean up data which has Merged Data by deleting blank rows & Columns
    By rizmomin in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-21-2019, 01:06 PM
  2. Cleaning rows of data and clean rows of duplicates not deleting.
    By guidom in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-21-2014, 12:48 PM
  3. VBA Code to Clean up Rows
    By tmarcello935 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-25-2013, 03:15 PM
  4. [SOLVED] VBA code for deleting Rows that contain specific criteria from Filtered Data
    By carlosriver24 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-31-2012, 12:23 PM
  5. i need vba code for deleting rows in excel based on different sheets data
    By Rajagopalan in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-25-2012, 10:28 AM
  6. [SOLVED] VBA Code to optimize and clean data- clean out numerical/ or symbol
    By tracylsr in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-05-2012, 04:21 PM
  7. [SOLVED] VBA Code to optimize and clean data
    By JoaoVr in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-29-2012, 10:33 AM

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