Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Pass named range to user defined function returns #value!
On Fri, 9 Nov 2007 19:40:00 -0800, IneedHelp
wrote: I always use option explicit, so typo's are not the issue...the example was not copied from the VBE. There must be something else that I am missing on refering to named ranges. BTW I am using 2003 Well, if that's the case, then most likely your named ranges are multicell ranges. So you have to treat them as such. You can't just refer to the named range as if it were a single cell range, if it is not. For example, modifying your routine a bit: --------------------------------- Option Explicit Public Function MyFunction(qtyIn, priceIn) Dim c As Range For Each c In qtyIn Debug.Print c Next c MyFunction = Application.WorksheetFunction.SumProduct(qtyIn, priceIn) End Function --------------------------------- --ron |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Pass named range to user defined function returns #value! | Excel Programming | |||
Pass named range to user defined function returns #value! | Excel Programming | |||
Passing a named range into a user defined function | Excel Programming | |||
User Defined Function used in Macro returns #VALUE | Excel Programming | |||
passing named range to a UDF user defined function | Excel Programming |