+ Reply to Thread
Results 1 to 9 of 9

Sort Ascending order and eliminate zero data

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

    Sort Ascending order and eliminate zero data

    Hello:

    Please refer to attached sheet.

    I have data in Column A to D where
    Column A is the employee #
    Column B is the name of the employee
    Column C is blank
    Column D is the hours worked

    The employee data is in
    row 1 is the heading
    row 31, cell D31 is the total of row from 2 to 30.

    I would like to have a VB Macro to sort out in Ascending order of emmloyee name (Column B) and ignore any with
    0.00 hours in column D and paste the result starting at Cell A45.



    Please help and let me know if any questions.

    Thank you

    Riz Momin
    Attached Files Attached Files
    Last edited by rizmomin; 06-18-2013 at 01:28 PM.

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

    Re: Sort Ascending order and eliminate zero data

    Riz,
    As an option,
    You can filter by column D and ignore values which are less than 0 and copy them to A45

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

    Re: Sort Ascending order and eliminate zero data

    Hi AB33:

    That's possible but i still need to filter the employee names in Ascending order.
    So basically, I need to sort the employees first and then delete the ones with zero hours

    Please help and Let me know if any questions.

    Thank you

    Riz Momin

  4. #4
    Forum Expert JasperD's Avatar
    Join Date
    05-07-2013
    Location
    Netherlands
    MS-Off Ver
    Excel 2016
    Posts
    1,393

    Re: Sort Ascending order and eliminate zero data

    Try this :

    Please Login or Register  to view this content.
    Please click the * below if this helps

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

    Re: Sort Ascending order and eliminate zero data

    Hi JasperD:

    Yes this works.
    Thank you so much for your help.

    Riz Momin

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

    Re: Sort Ascending order and eliminate zero data

    Hi JasperD:

    Is there a way i can only filter data from Row 2 to Row 30 (Row 1 and Row 31 exclude in filter as heading).
    I do not want to filter thru all of column A because i have other data.

    Thank you

    Riz Momin

  7. #7
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 365 on Win11 (desktop), 2019 on Win11 (notebook)
    Posts
    8,198

    Re: Sort Ascending order and eliminate zero data

    Hi, Riz,

    Please Login or Register  to view this content.
    Ciao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

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

    Re: Sort Ascending order and eliminate zero data

    Riz,

    I do not like the filter based on last row as it sometimes does not work, but since I can not paste it on the same sheet, I have left with no other options
    Attached Files Attached Files

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

    Re: Sort Ascending order and eliminate zero data

    Hi HaHoBe:

    Your code works great for me.
    Thank U

    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