Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default add a formula to a formula


i want to add to formula t

in column c1 there is a formula

=a1/b1 (let say formula is: x)

but x gives error (division by zero) in some cells

i want to add

=IF(ISERROR(FORMULA A);"N.M.";(FORMULA A))

is this possible

it will be too difficult maybe impossible for me to write every cel
different formulas
(the formula not the same in that whole worksheet

--
barkin
-----------------------------------------------------------------------
barkiny's Profile: http://www.excelforum.com/member.php...fo&userid=2039
View this thread: http://www.excelforum.com/showthread.php?threadid=49269

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default add a formula to a formula

Select the cells you want to change, then run the following code:

Sub AAA()
Dim Rng As Range
For Each Rng In Selection.SpecialCells(xlCellTypeFormulas).Cells
Rng.Formula = "=IF(ISERROR(" & Mid(Rng.Formula, 2) & _
"),""N.M""," & Mid(Rng.Formula, 2) & ")"
Next Rng
End If


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"barkiny"
wrote in message
...

i want to add to formula t

in column c1 there is a formula

=a1/b1 (let say formula is: x)

but x gives error (division by zero) in some cells

i want to add

=IF(ISERROR(FORMULA A);"N.M.";(FORMULA A))

is this possible

it will be too difficult maybe impossible for me to write every
cell
different formulas
(the formula not the same in that whole worksheet)


--
barkiny
------------------------------------------------------------------------
barkiny's Profile:
http://www.excelforum.com/member.php...o&userid=20397
View this thread:
http://www.excelforum.com/showthread...hreadid=492690



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Regression Leverage Formula (Jerry W. Lewis or Mike Middleton)already have DFITS formula PJ[_3_] Excel Worksheet Functions 2 June 2nd 10 03:45 PM
Excel 2002 Formula: Urgent Conditional Formula Required Right Away - if possible blue[_2_] Excel Discussion (Misc queries) 2 July 11th 07 06:08 PM
Build excel formula using field values as text in the formula val kilbane Excel Worksheet Functions 2 April 18th 07 01:52 PM
Excel 2002 formula displayed not value formula option not checked Dean Excel Worksheet Functions 1 February 28th 06 02:31 PM
Commenting custom formula fields/formula on formula editor Muxer Excel Programming 2 July 24th 03 01:02 AM


All times are GMT +1. The time now is 02:06 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"