close

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
Peter,

In general, first find and replace
=
with
'=

Then Famp;R
=DSUM
with
=IF(ISERROR(DSUM

Then Famp;R
)
with
)),0)

Then Famp;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 = quot;=IF(ISERROR(quot; amp; myForm amp; quot;),0,quot; amp; myForm amp; quot;)quot;
Next myCell
End Sub

HTH,
Bernie
MS Excel MVP
quot;Peter Cquot; gt; wrote in message
...
gt; What characters (~, #, ?) do I use to Find and Replace item cells of first
gt; following row with second row below?
gt;
gt;
gt; FIND these types, eg: =(DSUM(DIVOH,$CX$1,$DG$2:$DG$20)
gt;
gt; Replace with these types, eg:
gt; =IF(ISERROR(DSUM(DIVOH,$CX$1,$DG$2:$DG$20)),0)
gt;
gt; Thanks.
gt; Peter C
gt;
A big thanks Bernie, that was excellent!!!quot;Bernie Deitrickquot; lt;deitbe @ consumer dot orggt; wrote in message
...
gt; Peter,
gt;
gt; In general, first find and replace
gt; =
gt; with
gt; '=
gt;
gt; Then Famp;R
gt; =DSUM
gt; with
gt; =IF(ISERROR(DSUM
gt;
gt; Then Famp;R
gt; )
gt; with
gt; )),0)
gt;
gt; Then Famp;R
gt; '=
gt; with
gt; =
gt;
gt; Of course, =IF(ISERROR(DSUM(DIVOH,$CX$1,$DG$2:$DG$20)),0)
gt; isn't a good formula, so that isn't what you really want to do.
gt;
gt; Better would be a macro: Select all your cells with formulas and run this
gt; macro:
gt;
gt; Sub MakeIfIserror()
gt; Dim myCell As Range
gt; Dim myForm As String
gt;
gt; For Each myCell In Selection.SpecialCells(xlCellTypeFormulas)
gt; myForm = Mid(myCell.Formula, 2, Len(myCell.Formula))
gt; myCell.Formula = quot;=IF(ISERROR(quot; amp; myForm amp; quot;),0,quot; amp; myForm amp; quot;)quot;
gt; Next myCell
gt; End Sub
gt;
gt; HTH,
gt; Bernie
gt; MS Excel MVP
gt;
gt;
gt;
gt; quot;Peter Cquot; gt; wrote in message
gt; ...
gt;gt; What characters (~, #, ?) do I use to Find and Replace item cells of
gt;gt; first
gt;gt; following row with second row below?
gt;gt;
gt;gt;
gt;gt; FIND these types, eg: =(DSUM(DIVOH,$CX$1,$DG$2:$DG$20)
gt;gt;
gt;gt; Replace with these types, eg:
gt;gt; =IF(ISERROR(DSUM(DIVOH,$CX$1,$DG$2:$DG$20)),0)
gt;gt;
gt;gt; Thanks.
gt;gt; Peter C
gt;gt;
gt;
gt;

全站熱搜
創作者介紹
創作者 software 的頭像
software

software

software 發表在 痞客邦 留言(0) 人氣()