+ Reply to Thread
Results 1 to 8 of 8

Can't delete entire row based on condition in table range.

  1. #1
    Forum Contributor
    Join Date
    09-10-2012
    Location
    Slovakia
    MS-Off Ver
    Excel 365
    Posts
    176

    Can't delete entire row based on condition in table range.

    Hi everybody,

    I am facing issue with simple macro code which should delete entire row based on condition in specific column. I am using this code in other sheets and it works with no problems, but in this file is used Table, instead of normal range of cells.

    Table is between columns "B" and "BD". I am want to delete entire row based on condition "SGP" in column BF. I hoped that put one blank column between the end of table and condition's column would help, but unfortunately no. Could you pls help me update this code to catch my criteria?

    Please Login or Register  to view this content.

  2. #2
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Can't delete entire row based on condition in table range.

    Record a macro to delete a row - then you'll see how it's named.

    Here's a bit of code that I've used:

    Please Login or Register  to view this content.
    Last edited by xladept; 03-14-2016 at 06:21 PM.
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  3. #3
    Forum Contributor
    Join Date
    09-10-2012
    Location
    Slovakia
    MS-Off Ver
    Excel 365
    Posts
    176

    Re: Can't delete entire row based on condition in table range.

    xladept - thanks for your response. I already tried to record it before, but doesn't work in code after such update. Probably I used it wrong.

    And I also don't know, how can I update my code by using your code. Could you be so kind and help me to apply your bit of code into my? Thanks in advance for your help, understanding and patience.

  4. #4
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Can't delete entire row based on condition in table range.

    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window (or use the paperclip icon).

  5. #5
    Forum Contributor
    Join Date
    09-10-2012
    Location
    Slovakia
    MS-Off Ver
    Excel 365
    Posts
    176

    Re: Can't delete entire row based on condition in table range.

    Refer to enclosed example file. What I need is to delete entire row if column BF = SGP.

    Just fyi, I used column "BF" to define my criteria and avoid Table range, but if could help, it can be used in previous column "BE"
    Attached Files Attached Files

  6. #6
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Can't delete entire row based on condition in table range.

    Here's a workaround - for some reason, it didn't work the usual way?

    Please Login or Register  to view this content.

  7. #7
    Forum Contributor
    Join Date
    09-10-2012
    Location
    Slovakia
    MS-Off Ver
    Excel 365
    Posts
    176

    Re: Can't delete entire row based on condition in table range.

    Thanks so much!

  8. #8
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Can't delete entire row based on condition in table range.

    You're welcome and thanks for the rep!

+ 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. delete empty entire row with condition
    By ash3angel in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 06-29-2015, 08:29 AM
  2. [SOLVED] Delete Row based on combobox selection deleting entire range
    By SHUTTEHFACE in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-19-2014, 09:40 AM
  3. [SOLVED] VBA to delete entire row based on condition met
    By shiva_reshs in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 06-17-2014, 05:48 PM
  4. Delete entire row from range based on criteria
    By uncleslinky in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-29-2011, 06:10 AM
  5. Delete entire row on condition
    By bouitac in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-06-2009, 04:58 PM
  6. Delete entire row based on criterias in range?
    By drdavidge in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-21-2008, 02:28 PM
  7. [SOLVED] Can I delete an entire row if condition is not met?
    By Christine in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 05-04-2006, 04:50 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