Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 215
Default Reference in VBA to "Maximum change" Value ??

Hello;

Following an iteration procedure (e.g.; using GoalSeek or Solver in a
standard macro), it makes sense to avoid equal or zero comparisons or to
introduce a new error tolerance.
For example, if the iteration result from the procedure is res1 within the
"Maximum change" value set at (tol1=) 1.E-6 (or whatever), and I need to
compare res1 with an analytical value val1 using the same tol1: (Excel 2003
SP3, Windows XP)

' tol1 = Maximum change value set under Options
IF abs( res1 - val1) tol1 then
'.... do something
EndIF

How do I extract the value of (or make reference to) the "Maximum change"
value tol ??

Thank you kindly.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 215
Default Reference in VBA to "Maximum change" Value ??

Hi;

This works fine:

tol1 = Application.MaxChange
IF abs( res1 - val1) tol1 Then
'.... do something
EndIF

It couldn't be simpler! Sorry, but I don't have a clue why it didn't work
earlier!

Regards.


"monir" wrote:

Hello;

Following an iteration procedure (e.g.; using GoalSeek or Solver in a
standard macro), it makes sense to avoid equal or zero comparisons or to
introduce a new error tolerance.
For example, if the iteration result from the procedure is res1 within the
"Maximum change" value set at (tol1=) 1.E-6 (or whatever), and I need to
compare res1 with an analytical value val1 using the same tol1: (Excel 2003
SP3, Windows XP)

' tol1 = Maximum change value set under Options
IF abs( res1 - val1) tol1 then
'.... do something
EndIF

How do I extract the value of (or make reference to) the "Maximum change"
value tol ??

Thank you kindly.

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
Help displaying "Maximum" or "Minimum" if cell is max or min in a group? RussAllison Excel Discussion (Misc queries) 1 February 24th 11 02:22 AM
xy plot line style change when I select "fixed maximum" flobear Charts and Charting in Excel 1 November 17th 07 01:54 PM
change "true" and "false" to "availble" and "out of stock" inthestands Excel Worksheet Functions 2 July 19th 07 07:05 PM
can i change "A" to "Name" in reference to columns Debbie Excel Discussion (Misc queries) 2 January 12th 07 09:59 PM
Object hyperlink produces "Reference is not valid" error after worksheet name change [email protected] Excel Programming 2 December 13th 06 04:48 PM


All times are GMT +1. The time now is 08:46 PM.

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

About Us

"It's about Microsoft Excel"