+ Reply to Thread
Results 1 to 7 of 7

Replacement Problem (Ctrl+H)

Hybrid View

  1. #1
    Registered User
    Join Date
    05-20-2009
    Location
    Atlanta, GA
    MS-Off Ver
    Office 365
    Posts
    60

    Replacement Problem (Ctrl+H)

    I want to replace all the #VALUE!'s in a couple columns, but when i try Ctrl+H, I can onlny search in Formulas, and not in Values. Has this ever happened to anyone else? How can I get it so i can search in the cell value again so i can replace stuff?

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Replacement Problem (Ctrl+H)

    Replace them with what? Are you trying to edit the formulas within the cells or just blast out the contents and replace them completely with something else?

    For instance, this little stock macro will clear all the cells in columns J:O that have errors:
    Sub RemoveErr()
    'Clears all cells in range with error values
    Dim ws As Worksheet
        For Each ws In Worksheets
            ws.Columns("J:O").SpecialCells(xlCellTypeFormulas, 16).ClearContents
        Next ws
    End Sub
    That's designed to cycle through all the worksheets, but it can be changed to run on a single sheet, too.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    05-20-2009
    Location
    Atlanta, GA
    MS-Off Ver
    Office 365
    Posts
    60

    Re: Replacement Problem (Ctrl+H)

    I already filled a column with the appropriate formula. I want to replace the #VALUE! with blank cells.

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Replacement Problem (Ctrl+H)

    Well, here's a version that will clear all the cells on the current sheet with errors:
    Sub RemoveErr()
    'Clears all cells on activesheet with errors
        Cells.SpecialCells(xlCellTypeFormulas, 16).ClearContents
    End Sub
    Here's a version that will only clear the error cells in the range already highlighted when you run the macro:
    Sub RemoveErr()
    'Clears all cells in the selected range with errors
        Selection.SpecialCells(xlCellTypeFormulas, 16).ClearContents
    End Sub

  5. #5
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Replacement Problem (Ctrl+H)

    You can do Edit > Go To, Special, Formula, untick everything except Errors, OK.

    Then either hit Delete to clear the formulas, or enter a new formula or value in the formula bar, press and hold the Ctrl key, and then press Enter.
    Entia non sunt multiplicanda sine necessitate

  6. #6
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Replacement Problem (Ctrl+H)

    Quote Originally Posted by shg View Post
    You can do Edit > Go To, Special, Formula, untick everything except Errors, OK.
    Yep... that's the manual version of the macro I've suggested...at this basic level it really is almost as easy to just do it manually as it is to activate a macro. I would probably just do it this way.

  7. #7
    Forum Contributor mubashir aziz's Avatar
    Join Date
    03-18-2009
    Location
    Lahore, Pakistan
    MS-Off Ver
    MS Office 2013
    Posts
    533

    Re: Replacement Problem (Ctrl+H)

    I think you should not concentrate to delete the Err values except to make some change in your formula like if error then " " <blank cells> etc..... this is standard practice but i u don't have enough time to think on formula then while printing you can hide these values Just by File > Page Setup > Sheet > Here select Cell Error as <blank> so error cells will not be printed.

    Else you can adopt any method to solve the problem.
    If this post helps, Please don't 4get to click the star icon located at the bottom left of my Post.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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