View Single Post
  #15   Report Post  
Posted to microsoft.public.excel.programming
Diana[_5_] Diana[_5_] is offline
external usenet poster
 
Posts: 24
Default Is there more efficient formula?

Thanks for your response. Please, note comments below.

When I first looked at this I saw not 16 but 81 possible

combinations. If you haven't already ruled it to be
impossible, you should consider if
any circumstances might produce a negative number in any

of the 4
elements. (For example you might simply change each ""

to "<"). I
know that it doesn't fulfill your subject "more

efficient" but it may be
something that you need to program for.


This is an excellent point! However A, B, C and D are
preprogrammed in excel and they can never be negative.

You also speak of "null" when I sense you may really be

referring to
"zero" (the value 0).


Yes, you are totally right. I understand the difference
very well and it is a sheer mistake (note to self: do not
code while being hungover). Especially because A, B, C
and D can never be null, they are set to zero if no data
is available.

When you say "more efficient" did you mean in terms of
reducing redundant or unnecessarily repeated code, or

faster running?

Actually, when I plug in my formula I get instant
results. So it is not an issue of time. I was more
interested in seeing a different logic and methods. My
thinking reflects the attempts of soving a problem using
math and statistics primarily as opposed to using the
full on power of the vb goodness as the examples have
demonstrated.