Home |
Search |
Today's Posts |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
The latter is the simpler way IMO.
-- HTH RP (remove nothere from the email address if mailing direct) "silver23" wrote in message ... Passing range A1:A20 works because the udf is coded to identify positive changes between cells A1:A2 and A2:A3. If I attempt to pass A20:A1, however, the udf receives A1:A20. In turn, it interprets what are actually negative changes between cells as positive changes; defeating the purpose of the udf. How does one pass A20:A1 to a macro/udf? Or is it necessary to pass a second token, i.e. Function myUDF(rng As Range, num as Double) to identify the starting position? "Bob Phillips" wrote: Why would you not just pass the range to the function Function myUDF(rng As Range) For Each cell in rng 'do something Next cell End Function |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
What would be the most effective way to do this? | Excel Worksheet Functions | |||
Macro that will detemine date and then check off a box | Excel Worksheet Functions | |||
Effective method to paste array formula | Excel Worksheet Functions | |||
Can we Pass String to FieldInfo Array to OpenText Method. | Excel Programming | |||
Sheets(array) method for printing grouped worksheets | Excel Programming |