Thread: Excel "if" Bug?
View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
BEEJAY BEEJAY is offline
external usenet poster
 
Posts: 247
Default Excel "if" Bug?

Greetings:
Thanks for your input.
I tried your better still suggestion. When D377 is blank, it returns VALUE.
The other parts work as expected.
In the meantime, I have to get these contracts out, so I am using the
following, for now.
=IF(D336="",0,IF(D336="Both",2,IF(D336="Front",1,I F(D336="Rear",1,0))))
I don' t like it, but it seems to work, and since the D336 has a 3 option
validation on it, I don't think I can go wrong.

However, IF something comes to mind sometime, I'd still like to know what
the problem is.

From what I have been reading here and there, since my contracts are
constantly worked on ( insert lines, delete lines, etc.), apparently, it
would be advisable to "re-build" the contracts from scratch (cut and paste
sections into a new work-book). Apparently, this will likely leave a large
amount of "garbage" behind, IF I'm understanding this all correctly. The
same goes for all my macros, again, as I understand it.

Meanwhile, thanks for the time spent on puzzling this thru, and all the
suggestions.


"Jim Thomlinson" wrote:

try this...

=IF(trim(D337)="Front",1,IF(trim(D337)="Rear",1,IF (trim(D337)="Both",2,0)))

better still

=IF(or(trim(D337)="Front",trim(D337)="Rear"),1,IF( D337="Both",2,0))


--
HTH...

Jim Thomlinson


"BEEJAY" wrote:

=IF(D337="Front",1,IF(D337="Rear",1,IF(D337="Both" ,2,0)))
Formula created on new, blank sheet - Works Great
Copy to Contract Sheets - Big Problems
Formula will not return a Zero, (as expected) when D337 is Blank
Checked cell formatting, etc. All the same as the OK Version.
If I select fx so that the function arguments screen pops up, the first
statement shows as TRUE (althought D337 is blank).
When I check fx on the original sheet, (with a blank D337), the first
statement correctly shows as false.
If I do a copy (from the non-working sheet) and insert onto a new, blank ws,
the formula looks and works fine again.
Does anyone have any idea where I have to look for this one?