+ Reply to Thread
Results 1 to 3 of 3

FIND and REPLACE characters needed

  1. #1
    Peter C
    Guest

    FIND and REPLACE characters needed

    What characters (~, #, ?) do I use to Find and Replace item cells of first
    following row with second row below?


    FIND these types, eg: =(DSUM(DIVOH,$CX$1,$DG$2:$DG$20)

    Replace with these types, eg:
    =IF(ISERROR(DSUM(DIVOH,$CX$1,$DG$2:$DG$20)),0)

    Thanks.
    Peter C



  2. #2
    Bernie Deitrick
    Guest

    Re: FIND and REPLACE characters needed

    Peter,

    In general, first find and replace
    =
    with
    '=

    Then F&R
    =DSUM
    with
    =IF(ISERROR(DSUM

    Then F&R
    )
    with
    )),0)

    Then F&R
    '=
    with
    =

    Of course, =IF(ISERROR(DSUM(DIVOH,$CX$1,$DG$2:$DG$20)),0)
    isn't a good formula, so that isn't what you really want to do.

    Better would be a macro: Select all your cells with formulas and run this
    macro:

    Sub MakeIfIserror()
    Dim myCell As Range
    Dim myForm As String

    For Each myCell In Selection.SpecialCells(xlCellTypeFormulas)
    myForm = Mid(myCell.Formula, 2, Len(myCell.Formula))
    myCell.Formula = "=IF(ISERROR(" & myForm & "),0," & myForm & ")"
    Next myCell
    End Sub

    HTH,
    Bernie
    MS Excel MVP



    "Peter C" <[email protected]> wrote in message
    news:[email protected]...
    > What characters (~, #, ?) do I use to Find and Replace item cells of first
    > following row with second row below?
    >
    >
    > FIND these types, eg: =(DSUM(DIVOH,$CX$1,$DG$2:$DG$20)
    >
    > Replace with these types, eg:
    > =IF(ISERROR(DSUM(DIVOH,$CX$1,$DG$2:$DG$20)),0)
    >
    > Thanks.
    > Peter C
    >




  3. #3
    Peter C
    Guest

    Re: FIND and REPLACE characters needed

    A big thanks Bernie, that was excellent!!!


    "Bernie Deitrick" <deitbe @ consumer dot org> wrote in message
    news:[email protected]...
    > Peter,
    >
    > In general, first find and replace
    > =
    > with
    > '=
    >
    > Then F&R
    > =DSUM
    > with
    > =IF(ISERROR(DSUM
    >
    > Then F&R
    > )
    > with
    > )),0)
    >
    > Then F&R
    > '=
    > with
    > =
    >
    > Of course, =IF(ISERROR(DSUM(DIVOH,$CX$1,$DG$2:$DG$20)),0)
    > isn't a good formula, so that isn't what you really want to do.
    >
    > Better would be a macro: Select all your cells with formulas and run this
    > macro:
    >
    > Sub MakeIfIserror()
    > Dim myCell As Range
    > Dim myForm As String
    >
    > For Each myCell In Selection.SpecialCells(xlCellTypeFormulas)
    > myForm = Mid(myCell.Formula, 2, Len(myCell.Formula))
    > myCell.Formula = "=IF(ISERROR(" & myForm & "),0," & myForm & ")"
    > Next myCell
    > End Sub
    >
    > HTH,
    > Bernie
    > MS Excel MVP
    >
    >
    >
    > "Peter C" <[email protected]> wrote in message
    > news:[email protected]...
    >> What characters (~, #, ?) do I use to Find and Replace item cells of
    >> first
    >> following row with second row below?
    >>
    >>
    >> FIND these types, eg: =(DSUM(DIVOH,$CX$1,$DG$2:$DG$20)
    >>
    >> Replace with these types, eg:
    >> =IF(ISERROR(DSUM(DIVOH,$CX$1,$DG$2:$DG$20)),0)
    >>
    >> Thanks.
    >> Peter C
    >>

    >
    >




+ 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