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

On Fri, 4 May 2007 14:22:38 +0100, "Norman Jones"
wrote:

Hi Ron,

'------------------
Hmmm,

Trying out Gary's S suggestion, which works, it seems what is happening is
that, for some reason, if I use rg.text within the UDF, it screws up the
dependency tree. Whereas if I use rg.value (or just rg) within the UDF, it
does not.

Strange.
'------------------

In Charles W's discussion of UDF's, did you see
his comments on the use of cell properties other than .
value or .formula?

See:

Referencing cell formatting properties
http://www.decisionmodels.com/calcsecretsj.htm

---
Regards,
Norman


Here's what I saw and, when I read it, I didn't think it was applicable.

-----------------------------------------------
Referencing cell formatting properties

If your UDF references cell properties other than .value or .formula
(ie .Bold) there are some occasions when these properties may be undefined when
your UDF is evaluated. One such occasion is renaming a worksheet in automatic
mode. If this happens you may need to explicitly recalculate your function.
--------------------------------------------

The properties are not undefined. What is happening, according to my
experimentation (using breakpoints within the UDF), is that the UDF is being
calculated prior to the cell referenced in the Function declaration, and is not
recalculated after the precedent cell is calculated.

Within the UDF, changing rg.text to rg.value causes the function precedent cell
to be calculated first.


By the way, I sent a note to Charles W and I seemed to have piqued his
interest. He's planning to look into it.


--ron
Reply
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 08:10 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"