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
Default Any way to use "standard" Excel functions inside VBA functions

I am new to this group, so don't mind if I ask somthing that is too easy for
you. My question is whether
I may use all "standard" Excel 2007 functions. I would like to find interval
in which some function returns
"#NUM!" although it must not, because all parameters are inside "permited
ranges". My idea is to start
with some interval [A, B] for which A is "acceptable" argument and B is
"unacceptable" argument, and,
by halving it (C=A+(B-A)/2.0) and asking : IF C is "unacceptable" argument
THEN B=C ELSE A=C
WHILE (B-A(A+B)/2^32) and my User Defined Function returns A (or B). But
when I use somthing
like (inside my User Defined Function):

Dim X as Double ' and some more variables, not necessary for explanation

and, after that declaration, some assignments ... and :

X=Application.WorksheetFunction.IFERROR(Applicatio n.WorksheetFunction.<_someFunc(<parameters);
-8.0)

(because of my "Local settings" I use semicolumn as arguments' delimiter) in
order to assign to X value of that function
(it is between 0.0 and 1.0 for all values of parameters), or -8.0 if the
function returns "#NUM!", after that I would "ask"
whether X is less than 0.0 (this means that Excel function returns "#NUM!"),
and so on,...

But when I "walk through" my User Defined Function (F8, F8, ... F8) and see
that values of some other variables are
being changed as I expect, when the flow goes to the "sentence" a few rows
above program "crashes" as if the it exited
my UDF.

Please help !!!
Thanks !!!

 
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
Using the functions "LARGE"and "SMALL" in an Excel program Ed[_30_] Excel Programming 0 March 18th 08 05:14 PM
Excel "Move or Copy" and "Delete" sheet functions dsiama Excel Worksheet Functions 1 December 28th 07 01:57 PM
HELP on "left","right","find","len","substitute" functions serene83 Excel Discussion (Misc queries) 5 June 27th 06 02:23 AM
can we convert "2 days 16 hrs" to " 64hrs" using excel functions chris Excel Worksheet Functions 5 April 24th 06 12:53 AM
Please add a "sheet" function like "row" and "column" functions Spreadsheet Monkey Excel Programming 2 November 8th 05 04:08 PM


All times are GMT +1. The time now is 09:41 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"