+ Reply to Thread
Results 1 to 5 of 5

VBA to Delete each row based on cell value

  1. #1
    Registered User
    Join Date
    05-15-2013
    Location
    Hyderabad
    MS-Off Ver
    Excel 2003
    Posts
    39

    VBA to Delete each row based on cell value

    Hi Team,
    I tried to search for similar post as this is one of such that most people might have faced, but left no luck
    Team please assist and help me to identify where am I missing in the below code
    It doesn't work as I want it to, instead delete each and every row.

    Trying to delete all rows with text "True" in column "K"

    Please Login or Register  to view this content.

    Thanks for your time in helping team

  2. #2
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,962

    Re: VBA to Delete each row based on cell value

    VBA text comparisons are case sensitive, so if your entries were "True" and not "TRUE" , or if TRUE is not text but a boolean, then it is not "TRUE" (a lot depends on how it is entered.) So if you want to delete those rows with true, try this, which will delete rows with the text "True", "TRUE", or the boolean TRUE.

    Please Login or Register  to view this content.
    Bernie Deitrick
    Excel MVP 2000-2010

  3. #3
    Registered User
    Join Date
    05-15-2013
    Location
    Hyderabad
    MS-Off Ver
    Excel 2003
    Posts
    39

    Re: VBA to Delete each row based on cell value

    I am afraid I dont see the conditional row delete in the above code. Is something missing in here please help.
    And it doesnt work and stop at the below line

    Please Login or Register  to view this content.
    Last edited by naresh73; 09-28-2016 at 05:11 AM.

  4. #4
    Forum Expert
    Join Date
    08-16-2015
    Location
    Antwerpen, Belgium
    MS-Off Ver
    2007-2016
    Posts
    2,380

    Re: VBA to Delete each row based on cell value

    Maybe time to show your file


    Cheers
    Leo

  5. #5
    Registered User
    Join Date
    05-15-2013
    Location
    Hyderabad
    MS-Off Ver
    Excel 2003
    Posts
    39

    Re: VBA to Delete each row based on cell value

    It worked, I removed """ from my code and it worked. thanks team

+ 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] delete row based on cell value
    By a.hudrea in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-08-2016, 03:54 AM
  2. [SOLVED] delete row based on cell value vba
    By 1vision in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-26-2014, 01:30 AM
  3. Delete Row # based on cell value
    By stockgoblin42 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 06-13-2013, 02:23 PM
  4. Delete row based on cell FORMAT (color, font, etc) (not based on cell value)
    By trobey in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-12-2012, 10:39 AM
  5. Delete row based on Cell value
    By MSchibs in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-04-2010, 01:24 AM
  6. Delete Row Based on Cell of Another
    By pkbravo in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-12-2007, 12:34 PM
  7. [SOLVED] delete row based on value of cell in row
    By AD108 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-29-2006, 11:25 PM

Tags for this Thread

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