+ Reply to Thread
Results 1 to 3 of 3

VBA delete rows that don't contain the character /

  1. #1
    Registered User
    Join Date
    02-29-2012
    Location
    UK, Newcastle
    MS-Off Ver
    Office 365
    Posts
    97

    VBA delete rows that don't contain the character /

    Hi All, i want a VBA code to delete all rows that donot contain the "/" character. So column D contains part numbers in my sheet. We have two formats for part numbers one contains only numbers and the other will always have a / in it.
    I have tried the following code but this deletes all rows, however if i change the value to a specific value that i can see is in my spreadsheet it does delete all rows other than the row with the specific value.
    I was trying to use "*/*" hoping this would search on anything in the cell that contains /.
    the codes is shown below, any help would be appreciated.

    Please Login or Register  to view this content.
    Last edited by maax555; 02-19-2020 at 11:06 AM.

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,701

    Re: VBA delete rows that don't contain the character /

    The <> operator does not use wildcards. It takes all characters literally. Try this:

    Please Login or Register  to view this content.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Registered User
    Join Date
    02-29-2012
    Location
    UK, Newcastle
    MS-Off Ver
    Office 365
    Posts
    97

    Re: VBA delete rows that don't contain the character /

    Quote Originally Posted by 6StringJazzer View Post
    The <> operator does not use wildcards. It takes all characters literally. Try this:

    Please Login or Register  to view this content.
    Many thanks, that works perfectly.

+ 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 the rest of the character after found character E
    By oeyandyprawira in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 12-06-2018, 12:11 AM
  2. [SOLVED] how to delete a character from the character
    By rcahayag1925 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-15-2017, 05:39 AM
  3. [SOLVED] Delete rows that start with the character *
    By BillDoor in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-16-2015, 04:20 AM
  4. Delete rows if cells have character(s)...
    By elsoung in forum Excel General
    Replies: 8
    Last Post: 10-04-2012, 06:29 PM
  5. [SOLVED] Delete any character after the 7th character
    By plank in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-26-2012, 04:54 AM
  6. VBA Check number of empty rows after a character and add or delete if necessary
    By frjcd in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 04-08-2012, 06:55 PM
  7. Macro to find character and delete all text in cell after the character
    By SpencerRichman in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-01-2012, 06:08 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