Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 100
Default How to simplify a L O N G functional argument

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:)


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default How to simplify a L O N G functional argument

Yes... click Insert/Name/Define, type in your name (say AVG) and put the
value in as a formula (even though it will be in the middle of your own
formulas...

=AVERAGE(Sheet6!D12:G12)

You may want to use absolute cell references depending on if you will be
copying it and if you want or need to absolute fix either the row and/or
column reference.

Rick


"Gene" wrote in message
...
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:)



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,358
Default How to simplify a L O N G functional argument

Go to Menu, Insert--Name--Define
Names in workbook: TheData ---or some other name that you would use
Refers to: =AVERAGE(Sheet1!$D12:$G12) ---use appropriate sheet name of course
Then, for example, in cell H12, I would type the followingw:
=IF(ISERROR(TheData),"No Data",TheData)
--
John C


"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:)


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,393
Default How to simplify a L O N G functional argument

In Excel 2003 (all earlier): Insert | Name | Define
Give a name ( I used MYAVG)
Enter in refers to: =AVERAGE(Sheet1!$D$12:$G:12)
best wishes--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"Gene" wrote in message
...
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:)




  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default How to simplify a L O N G functional argument

Yes... click Insert/Name/Define, type in your name (say AVG) and put the
value in as a formula (even though it will be in the middle of your own
formulas...

=AVERAGE(Sheet6!D12:G12)


I left out this part... so you can now write your formula like this...

=IF(ISERROR(AVG),"No Data",AVG)

Rick


  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default How to simplify a L O N G functional argument

If you're using Excel 2007:

=IFERROR(AVERAGE(D12:G12),"No Data")


--
Biff
Microsoft Excel MVP


"Gene" wrote in message
...
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:)




  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 6
Default How to simplify a L O N G functional argument

AND(IF(Excel_Version=2007,use IFERROR(),0))

"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:)


  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default How to simplify a L O N G functional argument

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:)


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
Using + and / as characters not as functional formatting Bonnie Excel Discussion (Misc queries) 9 August 31st 07 03:58 PM
Excel 2007 Nearly Non Functional Desert Doug Excel Discussion (Misc queries) 10 June 10th 07 05:39 AM
Fully functional spreadsheets on web? famdamly Excel Discussion (Misc queries) 4 April 18th 06 10:21 AM
Conversion of Cell Contents into a Functional Worksheet name ? GMJT Excel Worksheet Functions 1 August 21st 05 04:59 PM
Non-functional Popup Menu Boxes Jim_M Charts and Charting in Excel 0 January 20th 05 04:27 PM


All times are GMT +1. The time now is 09:26 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"