+ Reply to Thread
Results 1 to 3 of 3

Deleting Specific Text From Various Cells

Hybrid View

  1. #1
    Registered User
    Join Date
    09-11-2008
    Location
    Manchester
    Posts
    12

    Question Deleting Specific Text From Various Cells

    Hey there people.

    I'm in need of a script that deletes cells that contain the word "Unknown" which are present in several columns on my spreadsheet.

    I don't want it to alter the other data in any way, just to clear the text from those cells.

    Thanks, Chris.

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,525
    Hi Chris,
    The macro recorder works great for this
    Hit Ctrl + H
    for find and replace
    here's what the code loks like.

    Sub Macro1()
    '
    ' Macro1 Macro
    ' Macro recorded 9/11/2008 by Dave Morrison
    '
    
    '
        Cells.Replace What:="Unknown", Replacement:="", LookAt:=xlPart, _
            SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
            ReplaceFormat:=False
    End Sub

  3. #3
    Registered User
    Join Date
    09-11-2008
    Location
    Manchester
    Posts
    12
    Ah wow, thankyou very much

+ 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. Searching cells within a range that contain specific text
    By JohnG73 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-20-2016, 05:52 AM
  2. How do I Copy text only, not cells.
    By su_jumptd in forum Excel General
    Replies: 7
    Last Post: 06-13-2012, 12:56 AM
  3. Graphing specific cells
    By clintonf in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-28-2008, 12:50 PM
  4. How to get MIN value from range of cells containing text?
    By Neorth in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 08-29-2007, 12:19 PM
  5. Match Limitations: not finding value in cells with alot of text.
    By vipjun in forum Excel Formulas & Functions
    Replies: 14
    Last Post: 02-10-2007, 05:58 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