Calculation order
- From: Ron Rosenfeld <ronrosenfeld@xxxxxxxxxx>
- Date: Fri, 04 May 2007 08:00:30 -0400
I just came across something interesting, and wonder if someone can point me to
a discussion.
I noted with regard to a UDF I have to convert Roman to Arabic numerals, that
the function call seems to affect the work*** calculation order.
The original function call was:
Function Arabic (rg as range) as Long
With this call, given the following:
A1: some arabic number
A2: =ROMAN(A1)
A3: =Arabic(A2)
A3 appeared to calculate first. So that making a change in A1 would result in
A3 showing the number that was PREVIOUSLY in A1 instead of the current number.
Moving the cells around did not make a difference.
What did make a difference was eliminating the Type specification (or changing
the type specification to Variant) for the variable in the function call:
Function Arabic (rg) as Long
or
Function Arabic (rg as variant) as long
--ron
.
- Follow-Ups:
- Re: Calculation order
- From: Norman Jones
- Re: Calculation order
- Prev by Date: Re: Macro that moves data "From Akash"
- Next by Date: Re: set macro security to low does not save the setting
- Previous by thread: Re: Macro that moves data "From Akash"
- Next by thread: Re: Calculation order
- Index(es):