View Single Post
  #15   Report Post  
Posted to microsoft.public.excel.worksheet.functions
joeu2004 joeu2004 is offline
external usenet poster
 
Posts: 2,059
Default IF just STOPS WORKING

"Gee" wrote:
I went back through the suggestions and totally missed extending
to 13 decimal places..it looks like that might just work!


Changing the format has nothing to do with the correctness or not of the
AND() expression.

I suggested formatting to 13 decimal places merely as a diagnostic
approach -- a way for you to show us what data the IF() formula "fails"
on -- keeping in mind that you never answered my question, namely: what
results represent "failure", and what results represent "working", and with
what data?

The IF() formula sometimes works and sometimes fails because it is
apparently fundamentally flawed. Failure and success is presumably due to
changes in data. If you told us what the data looked like and, in English,
what you are trying to accomplish with the IF() formula, we might be more
effective in showing you how to write it so that it works for all data that
you will encounter.

But I think I am only confusing your further. I suggest that you "start
over" -- in this thread, not in another thread. State what you are
currently doing, since it might have morphed by now (mea culpa!), along with
everything else I suggested above.

PS: Sorry about the confusion between HI2 and H12. Weary eyes. Also, H12
seemed more likely. But okay: HI2 it is.


----- original message -----

"Gee" wrote in message
...
I went back through the suggestions and totally missed extending to 13
decimal places..it looks like that might just work!
The rounding didn't, but that out to 13 places looks like it will.
Thank you SO much for your patience and brain.



"JoeU2004" wrote:

"Gee" wrote:
I thought it might be something like that. I changed the columns
to no decimal places, but since it was getting data from an external
database it might have caused the problem.
It's working right now...if it stops I'll be back!


I think you missed the point. Changing the format only changes the
appearance of the cell value; it does not change the actual value.
WYSI(not)WYG!


You wrote previously:
=IF(AND(HI2401,HI2<402),"YES","NO")


If you are happy with displaying H12 with zero decimal places, it is no
longer clear what your intent is with the AND() expression above.

I suspect you want:

=if(and(401<=round(H12,0),round(H12,0)<=402), "YES", "NO")


----- original message -----

"Gee" wrote in message
...
I thought it might be something like that. I changed the columns to no
decimal places, but since it was getting data from an external database
it
might have caused the problem.
It's working right now...if it stops I'll be back!
Thank you SO much for the help! I was really in a corner.


"JoeU2004" wrote:

"Gee" wrote:
Why has this worked for about 3 hours and then suddenly stopped??

Define "working".


=IF(AND(HI2401,HI2<402),"YES","NO")

It probably has nothing to do with time of day, unless the value in
H12
is
derived from time of day (i.e. NOW()).

More likely, the value in H12 is not what it appears to be. For
example,
if
the value is 401.00001, it might be displayed as 401, so you might
expect
"NO". But AND(401<H12,H12<402) returns TRUE, so you actual get "YES".

If that is not enough to help you, post again with details, namely the
formula and value in H12, formatted to 13 decimal places.


----- original message -----

"Gee" wrote in message
...
Why has this worked for about 3 hours and then suddenly stopped??

Excel 2007 is what I'm using

=IF(AND(HI2401,HI2<402),"YES","NO")

Thank you in advance for any help you can give me.