LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,651
Default Calculation order

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 worksheet 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
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
calculation order Weaver Dean Excel Worksheet Functions 2 March 7th 07 02:03 PM
Order of calculation Louise Excel Discussion (Misc queries) 12 June 2nd 06 08:51 AM
Order of calculation RW Excel Discussion (Misc queries) 3 January 10th 06 02:10 PM
Order of Calculation John H W[_2_] Excel Programming 3 March 7th 05 11:22 PM
BIMDAS - Order of Calculation Atreides Excel Discussion (Misc queries) 20 February 23rd 05 02:33 AM


All times are GMT +1. The time now is 11:00 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"