I
IneedHelp
If I pass a named range as a parameter to a user defined function, it returns
#value!
I created several named ranges.
For Example
A1:A100 is qty
B1:B100 is price
If I enter qty * price in colum C, the results are as I expect. However,
when I attemp to pass the named range to a user defined function, it returns
#value! and debug.print inside by UDF yields no value.
For example: MyFunction(qtyIn, priceIn) returns #Value!
Public Function MyFunction(qtyIn, priceIn)
debug.print qtyIn
MyFunction = qytIn * priceIN
End function
I have experience using VBA but am new to using VBA in Excel.
#value!
I created several named ranges.
For Example
A1:A100 is qty
B1:B100 is price
If I enter qty * price in colum C, the results are as I expect. However,
when I attemp to pass the named range to a user defined function, it returns
#value! and debug.print inside by UDF yields no value.
For example: MyFunction(qtyIn, priceIn) returns #Value!
Public Function MyFunction(qtyIn, priceIn)
debug.print qtyIn
MyFunction = qytIn * priceIN
End function
I have experience using VBA but am new to using VBA in Excel.