Home |
Search |
Today's Posts |
#8
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
One other method
Write your original formula as just =AVERAGE(D12:G12) You can add the error trap to all selected cells with this macro. Sub ErrorTrapAdd() Dim myStr As String Dim cel As Range For Each cel In Selection If cel.HasFormula = True Then If Not cel.Formula Like "=IF(ISERROR*" Then myStr = Right(cel.Formula, Len(cel.Formula) - 1) cel.Value = "=IF(ISERROR(" & myStr & "),"No Data"," & myStr & ")" End If End If Next End Sub Gord Dibben MS Excel MVP On Wed, 16 Jul 2008 12:41:01 -0700, Gene wrote: I have the following function (this is a "simple" example): =IF(ISERROR(AVERAGE(D12:G12)),"No Data",AVERAGE(D12:G12)) I don't want to retype, the "AVERAGE (D12:G12)" argument, can I use a "define name" to replace this functional argument? (here in a very simple format) THANKS! Gene:) |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Using + and / as characters not as functional formatting | Excel Discussion (Misc queries) | |||
Excel 2007 Nearly Non Functional | Excel Discussion (Misc queries) | |||
Fully functional spreadsheets on web? | Excel Discussion (Misc queries) | |||
Conversion of Cell Contents into a Functional Worksheet name ? | Excel Worksheet Functions | |||
Non-functional Popup Menu Boxes | Charts and Charting in Excel |