+ Reply to Thread
Results 1 to 7 of 7

Delete rows with specific text in column

  1. #1
    Registered User
    Join Date
    10-30-2013
    Location
    Sweden
    MS-Off Ver
    Excel 2010
    Posts
    24

    Delete rows with specific text in column

    I found the following macro on another forum (unfortunately I do remember who posted it):

    Please Login or Register  to view this content.
    What i need help with is to also delete all rows with "(Physical Store)" in the same macro but it does not work for me.

    Thanks in advance
    Last edited by alansidman; 10-30-2013 at 10:47 AM. Reason: code tags added

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2504 Win 11
    Posts
    24,706

    Re: Delete rows with specific text in column

    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 here



    (I have added them for you this time. Please read our rules and abide by them 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

  3. #3
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2504 Win 11
    Posts
    24,706

    Re: Delete rows with specific text in column

    Attach a sample workbook. Make sure there is just enough data to make it clear what is needed. 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 demonstrated, mock them up manually if needed. Remember to desensitize the data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic

  4. #4
    Registered User
    Join Date
    10-30-2013
    Location
    Sweden
    MS-Off Ver
    Excel 2010
    Posts
    24

    Re: Delete rows with specific text in column

    Oh sorry. I'm a beginner in VBA and it is the first time for me posting. Thanks for the help!

  5. #5
    Registered User
    Join Date
    10-30-2013
    Location
    Sweden
    MS-Off Ver
    Excel 2010
    Posts
    24

    Re: Delete rows with specific text in column

    What i need help with is a macro that deletes all rows with either (No risk) or (Physical store) in column B. As i mentioned before i found the following macro here but it only takes away one of them. I want both to be deleted.

    Please Login or Register  to view this content.
    Attached Files Attached Files

  6. #6
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2504 Win 11
    Posts
    24,706

    Re: Delete rows with specific text in column

    this worked for me on your file

    I did need to change the sub routine name to make it all one string
    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    10-30-2013
    Location
    Sweden
    MS-Off Ver
    Excel 2010
    Posts
    24

    Re: Delete rows with specific text in column

    Thank you very much alansidman. Appreciate it!

+ 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 / Keep rows containing specific text.
    By fluteloop in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 09-30-2014, 06:48 PM
  2. [SOLVED] Delete rows fi specific text
    By blue.chio in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-26-2013, 02:23 PM
  3. [SOLVED] Locate column with specific title and delete rows if predefined set of text is found
    By johnny_tc in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 10-25-2012, 01:57 PM
  4. [SOLVED] Delete rows that do not contain specific text
    By jahburt in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-03-2012, 04:14 PM
  5. Delete rows with specific text
    By MAYDAY in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 06-08-2005, 11:05 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