+ Reply to Thread
Results 1 to 3 of 3

VBA match case to delete ABC but not Abc

  1. #1
    Registered User
    Join Date
    07-22-2008
    Location
    WV
    Posts
    70

    VBA match case to delete ABC but not Abc

    I'm using the following code to find text in column C and then delete the entire row if that column contains the text. However I want it to be case sensitive, as in delete "ABC" but not "Abc". Any help is appreciated.


    Please Login or Register  to view this content.

  2. #2
    Forum Expert JLGWhiz's Avatar
    Join Date
    02-20-2011
    Location
    Florida, USA
    MS-Off Ver
    Windows 10, Excel 2013
    Posts
    2,070

    Re: VBA match case to delete ABC but not Abc

    Unfortunately, the Autofilter function in VBA does not have a string compare attribute that can be applied with the filter. You will have to clean up the filter results with additional code (or manually) if it gives you more that you wished for.
    Last edited by JLGWhiz; 02-15-2021 at 02:31 PM.
    Any code provided by me should be tested on a copy or a mock up of your original data before applying it to the original. Some events in VBA cannot be reversed with the undo facility in Excel. If your original post is satisfied, please mark the thread as "Solved". To upload a file, see the banner at top of this page.
    Just when I think I am smart, I learn something new!

  3. #3
    Forum Expert nankw83's Avatar
    Join Date
    08-31-2015
    Location
    Kuwait
    MS-Off Ver
    365
    Posts
    1,712

    Re: VBA match case to delete ABC but not Abc

    Try this code ...
    Please Login or Register  to view this content.
    If I was able to help, you can thank me by clicking the * Add Reputation under my user name

+ 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] Go to first Upper case letter and delete to the left.
    By AG_84 in forum Excel General
    Replies: 12
    Last Post: 12-05-2018, 04:00 PM
  2. Replies: 2
    Last Post: 01-26-2015, 04:53 AM
  3. Replies: 7
    Last Post: 10-13-2014, 12:23 PM
  4. Delete duplicates with lower case and upper case taken into account?
    By Tinwelende in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 06-17-2013, 11:35 AM
  5. Replies: 20
    Last Post: 04-15-2013, 01:06 PM
  6. Select Case and Delete rows
    By labrooy in forum Excel Programming / VBA / Macros
    Replies: 22
    Last Post: 12-23-2011, 04:30 AM
  7. Macro - Delete Rows of a Certain Letter Case
    By godonnygo in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-30-2007, 06:00 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