Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Passing a named range to a function
I have a named range called "Temperature" that is 1 x 10 vector.
I have a function x(ByVal value1 as double, Byval value2 as double) that I need to run on all 10 temperatures. When I go x(4,5) the function works. When I go x(Temperature,5) the function gives #VALUE! error. My intent is that the function will pull the Temperature value from the vector in the column above it (or row beside it). Little help? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Passing a named range to a function
Hard to know what you are trying to do, and hence it is hard to make
specific recommendations, when you hide the code from us. I can tell you that your first argument is expecting a simple variable of type Double and you are attempting to pass a Range (which is not a simple variable) into it. You might be able to overcome that by using a Variant, then testing the type of data that was passed in and reacting to that. Again, seeing your code would make it easier to recommend something. By the way, is the Temperature range **always** the one you want to do your calculations from... or could there be other named ranges that the function will need to be able to process? -- Rick (MVP - Excel) "Mike M 91107" wrote in message ... I have a named range called "Temperature" that is 1 x 10 vector. I have a function x(ByVal value1 as double, Byval value2 as double) that I need to run on all 10 temperatures. When I go x(4,5) the function works. When I go x(Temperature,5) the function gives #VALUE! error. My intent is that the function will pull the Temperature value from the vector in the column above it (or row beside it). Little help? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Passing a range to a function | Excel Programming | |||
Passing Excel NAMED Range to VBA | Excel Worksheet Functions | |||
Passing a named range into a user defined function | Excel Programming | |||
passing named range to a UDF user defined function | Excel Programming | |||
Passing a named range to a chart/series object | Excel Programming |