View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
vezerid vezerid is offline
external usenet poster
 
Posts: 751
Default using named ranges for formula abbreviations

Although I seriously doubt the eventual utility of this approach, here
is a UDF that is a shorthand for SUMPRODUCT:

Function SP(args As String)
SP = Evaluate("SUMPRODUCT(" & args & ")")
End Function

It can be called by entering the arguments as a string e.g.

=SP("--($H$4:$H$21=J5),--($F$4:)$F$21)")

As you notice we have a single Text argument, which contains what
would otherwise be your argument list.

HTH
Kostis Vezerides

On Feb 26, 6:16 pm, Dave Breitenbach
wrote:
I would like to use named ranegs, if possible, to replace the function
SUMPRODUCT with the abbreviated nam "SP." I created the named range SP and
called it sumproduct, but I have not been able to make it work.

this function
=SP&"(--($H$4:$H$21=J5),--($F$4:)$F$21))"
gives me as a result
sumproduct(--($H$4:$H$21=J5),--($F$4:)$F$21))
but does niot give me the result of that formula.

any help would be greatly appreciated.

Dave