+ Reply to Thread
Results 1 to 4 of 4

VBA - Delete all rows with zero value in particular column

  1. #1
    Forum Contributor
    Join Date
    10-03-2015
    Location
    North Carolina, USA
    MS-Off Ver
    Office 365
    Posts
    167

    Question VBA - Delete all rows with zero value in particular column

    Hi,

    I would like to be able to delete all rows of data which have 0.00 in the fifth column. The column header is "Hrs per Position", and the sheet name is "GPT to PlanView Mapping". The number of rows will change from time to time.

    I found the following code, but it is not working for me, and I do not know how to fix it.

    Option 1:

    Please Login or Register  to view this content.
    Option 2:
    Please Login or Register  to view this content.
    Any help would be greatly appreciated!!

    Carlos
    Last edited by alansidman; 04-13-2017 at 02:18 PM.

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

    Re: VBA - Delete all rows with zero value in particular column

    Hi Carlito

    Welcome to the Forum.
    In future please view the forum rules before posting. Your post does not comply with rule3.
    3. Use code tags around code. Posting code without them makes your code hard to read and difficult to be copied for testing. Highlight your code and click the [#] button at the top of the post window.
    Please Login or Register  to view this content.
    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!!!

  3. #3
    Forum Contributor
    Join Date
    10-03-2015
    Location
    North Carolina, USA
    MS-Off Ver
    Office 365
    Posts
    167

    Re: VBA - Delete all rows with zero value in particular column

    Hi sintek, and thank you for the welcome message. Also, thank you for the code!

    I am sorry that I did not follow all of the rules. Unfortunately, I do not even know what you mean by code tags.

    Edit: I just figured it out. I'll use them in the future.

    Ok, I am going to try your code now!

  4. #4
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2406 Win 11 Home 64 Bit
    Posts
    23,959

    Re: VBA - Delete all rows with zero value in particular column

    Code Tags Added
    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found at http://www.excelforum.com/forum-rule...rum-rules.html



    (I have added them for you today. Please take a few minutes to read all Forum Rules and comply in the future.)
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

+ 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. code to find rows with same value in column C:F and delete the rows
    By bezbid in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-03-2016, 09:52 AM
  2. Replies: 2
    Last Post: 02-29-2016, 03:05 PM
  3. [SOLVED] Vba to sum up rows based on column a & b and delete duplicate rows
    By kevivu in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-05-2016, 03:15 PM
  4. Macro to keep rows that have certain text in one column, delete rows that do not.
    By mandalope in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-24-2014, 02:35 PM
  5. Replies: 5
    Last Post: 11-12-2012, 08:38 PM
  6. Macro to delete certain columns and delete rows based on time in another column
    By beepbeep27 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-12-2012, 11:47 AM
  7. Sort Column, Delete Rows, Delete Column, Move Molumn, more inside?
    By motown in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 05-13-2008, 09:44 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