+ Reply to Thread
Results 1 to 6 of 6

Delete rows if column "A" has specific text

  1. #1
    Registered User
    Join Date
    03-21-2022
    Location
    India
    MS-Off Ver
    Microsoft version 2201
    Posts
    22

    Delete rows if column "A" has specific text

    Hello,
    See attached excel and screenshot.
    I want macros/vba to delete complete rows when column "A" has "Ax.Services.Data.DCAssetBaseABC", "Ax.Services.Data.DCContractArgsCDA", "Ax.Services.Data.DCAssetBaseXYZ" (the list is more) etc...

    ForumExcludeItems.xlsx
    ForumExclude.PNG

  2. #2
    Valued Forum Contributor rollis13's Avatar
    Join Date
    01-26-2012
    Location
    Cordenons
    MS-Off Ver
    Excel 2016 32bit - Win 11
    Posts
    917

    Re: Delete rows if column "A" has specific text

    Have a try with what I came up; to be pasted in a vbe module and used on the active sheet:
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    03-21-2022
    Location
    India
    MS-Off Ver
    Microsoft version 2201
    Posts
    22

    Re: Delete rows if column "A" has specific text

    If I add more items in Array (), it is giving error!! Is it because of many items?

  4. #4
    Valued Forum Contributor rollis13's Avatar
    Join Date
    01-26-2012
    Location
    Cordenons
    MS-Off Ver
    Excel 2016 32bit - Win 11
    Posts
    917

    Re: Delete rows if column "A" has specific text

    No, in truth there is a limit but it's a very big number. Did you use the exact syntax ? please show your current array because your problem is probably the limit of the lenght of line in VBE. In this case you have to split your line with an underscore _ just after a comma ,
    Last edited by rollis13; 03-23-2022 at 09:44 AM.

  5. #5
    Registered User
    Join Date
    03-21-2022
    Location
    India
    MS-Off Ver
    Microsoft version 2201
    Posts
    22

    Re: Delete rows if column "A" has specific text

    Yes after using _ it works

  6. #6
    Valued Forum Contributor rollis13's Avatar
    Join Date
    01-26-2012
    Location
    Cordenons
    MS-Off Ver
    Excel 2016 32bit - Win 11
    Posts
    917

    Re: Delete rows if column "A" has specific text

    Thanks for the positive feedback , glad having been of some help.

+ 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 a cell if it contains specific text ("")
    By nekmat97 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-27-2019, 02:51 AM
  2. [SOLVED] Delete rows if value in Column "X" is out of specific range.
    By powerzasty in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 10-08-2017, 04:15 PM
  3. Replies: 6
    Last Post: 08-25-2016, 02:24 AM
  4. Replies: 2
    Last Post: 04-20-2014, 11:18 AM
  5. [SOLVED] If there is any text in column "A$" on "sheet1" then move cell to column "A$" on "sheet2"
    By ckgeary in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 06-27-2013, 08:28 PM
  6. Delete rows in the result of formulas "OK" n column "J"
    By marreco in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-29-2012, 10:08 AM
  7. Excel 2007 : Delete rows containing "NA" in column "A"
    By grsnipe in forum Excel General
    Replies: 4
    Last Post: 08-16-2011, 06:57 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