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 |
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 |
All times are GMT +1. The time now is 05:51 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com