+ Reply to Thread
Results 1 to 6 of 6

ClearContent Based on Contents Matching

  1. #1
    Registered User
    Join Date
    05-22-2014
    Posts
    11

    ClearContent Based on Contents Matching

    I thought this would be quite simple to solve and have been searching through Google since yesterday but still not managed to resolve it. I've come close but not managed it.
    I have a column with various values in, string and numeric. The strings I want to keep have "," in and letters one side and "space" on the other. All the cells I want cleared do not have ","
    The rest of what I'm using works fine accept this line which forces an error. Please could someone help me with it. Thank you in anticipation.
    Please Login or Register  to view this content.

  2. #2
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,820

    Re: ClearContent Based on Contents Matching

    Try:
    Please Login or Register  to view this content.
    You can say "THANK YOU" for help received by clicking the Star symbol at the bottom left of the helper's post.
    Practice makes perfect. I'm very far from perfect so I'm still practising.

  3. #3
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: ClearContent Based on Contents Matching

    Try:

    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    05-22-2014
    Posts
    11

    Re: ClearContent Based on Contents Matching

    Hi Thanks for the suggestions. Unfortunately both come up with a 'Runtime 1009' error.
    The full code I have is below. It may not be the most efficient but this is a one time use situation.
    Please Login or Register  to view this content.

  5. #5
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: ClearContent Based on Contents Matching

    Is it possible that some of the cells have error values (e.g. #DIV/0)?
    If so, try
    Please Login or Register  to view this content.
    _
    ...How to Cross-post politely...
    ..Wrap code by selecting the code and clicking the # or read this. Thank you.

  6. #6
    Registered User
    Join Date
    05-22-2014
    Posts
    11

    Re: ClearContent Based on Contents Matching

    Thanks stnkynts worked 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. ClearContent Macro causing Excel crash.
    By Phily915 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-23-2014, 12:54 PM
  2. Clearcontent not working
    By Emma_B in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-10-2013, 06:23 AM
  3. Clearcontent not working
    By Emma_B in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-10-2013, 05:19 AM
  4. Replies: 2
    Last Post: 04-11-2013, 11:14 AM
  5. Delete Form Buttons on ClearContent
    By ExcelWizards in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-31-2013, 12:48 PM

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