Trying to get this if statment to work

  • Thread starter Cerealkiller via OfficeKB.com
  • Start date
C

Cerealkiller via OfficeKB.com

I have excel 2000. I am trying to get this formula to work. It does not give
me any errors or anything It just will not return the number in the cell that
it references

Cell CJ44 has the formula

Here is an example of the cells

CJ44 formula CL44 has =IF((I44=0),0,INT((I44-10)/2)) (the value in their is 0)
CK44 has =IF((H44=0),0,INT((H44-10)/2)) (the value in their is -1) CP44 (the
value in their is Y) but I want it to fuction normally if their is nothing
(blank) in cell CP44

So this is what I have written, but the value does not return to what I want
it to be.

=IF(H44=0,CL44,IF(I44>0,CK44,IF(CP44=Y,CL44)))
 
O

OssieMac

Firstly if Y is a value in cell then it needs to be enclosed in double
quotes in the formula.

Anyway do I interpret your question correctly that you want to test for
either "Y" or Blank Cell at CP44. If so, then try the following.

=IF(H44=0,CL44,IF(I44>0,CK44,IF(OR(CP44="Y",ISBLANK(CP44)),CL44)))

I think that ISBLANK function is available in xl2000 but just in case it is
not then could use the following.

=IF(H44=0,CL44,IF(I44>0,CK44,IF(OR(CP44="Y",LEN(CP44)=0),CL44)))

Both formulas will return FALSE if it gets to the last IF statement and CP44
is not blank and has a value other than "Y".
 
C

Cerealkiller via OfficeKB.com

OssieMac said:
Firstly if Y is a value in cell then it needs to be enclosed in double
quotes in the formula.

Anyway do I interpret your question correctly that you want to test for
either "Y" or Blank Cell at CP44. If so, then try the following.

=IF(H44=0,CL44,IF(I44>0,CK44,IF(OR(CP44="Y",ISBLANK(CP44)),CL44)))

I think that ISBLANK function is available in xl2000 but just in case it is
not then could use the following.

=IF(H44=0,CL44,IF(I44>0,CK44,IF(OR(CP44="Y",LEN(CP44)=0),CL44)))

Both formulas will return FALSE if it gets to the last IF statement and CP44
is not blank and has a value other than "Y".
I have excel 2000. I am trying to get this formula to work. It does not give
me any errors or anything It just will not return the number in the cell that
[quoted text clipped - 13 lines]
=IF(H44=0,CL44,IF(I44>0,CK44,IF(CP44=Y,CL44)))

Thank you for your help I will try it out and see if it works
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top