• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Need Cell Contents To Read "Blank"

BL84

Member
I have this formula in C4.

=IF((C2-C3)<=2,1,)

I would like C4 to show "nothing" when C2 & C3 are empty.

Right now, C4 shows a 1 when C2 & C3 are empty.

What can I do?

Thanks

BL84
 
Hi ,

Other than being empty , what are the other data that can be entered in C2 and C3 ?

If it is just a check to see whether C2 and C3 are blank , you can use either of the following :

=IF(AND(ISBLANK(C2),ISBLANK(C3)),"",IF((C2-C3)<=2,1,))

What this will do is :

If both C2 and C3 are blank , the formula will output a null character , which means the cell will display nothing.

If not , if the difference between C2 and C3 is less than 2 , the formula will output 1.

If not , the formula will output 0.
--------------------------------------------------------------------------------------

=IF(AND(C2="",C3=""),"",IF((C2-C3)<=2,1,))

This will work whether C2 , C3 are blank , or contain a null character as a result of a formula.

Narayan
 
Hi ,

Other than being empty , what are the other data that can be entered in C2 and C3 ?

If it is just a check to see whether C2 and C3 are blank , you can use either of the following :

=IF(AND(ISBLANK(C2),ISBLANK(C3)),"",IF((C2-C3)<=2,1,))

What this will do is :

If both C2 and C3 are blank , the formula will output a null character , which means the cell will display nothing.

If not , if the difference between C2 and C3 is less than 2 , the formula will output 1.

If not , the formula will output 0.
--------------------------------------------------------------------------------------

=IF(AND(C2="",C3=""),"",IF((C2-C3)<=2,1,))

This will work whether C2 , C3 are blank , or contain a null character as a result of a formula.

Narayan

Hi Narayan,

Small numbers are all that would be entered into C2 or C3. When in use, c2 would be a 2-3-4-5 and c3 would be a 1-2-3.

I'll give those a shot.

Many thanks,

BL84
 
Hi ,

Apart from checking to see whether C2 , C3 are blank , another possibility is to check for whether they contain numbers.

Excel has an ISNUMBER function , which will return TRUE if a cell contains a number , and FALSE otherwise.

Thus , you can also use :

=IF(OR(ISNUMBER(C2),ISNUMBER(C3)),IF((C2-C3(<=2,1,),"")

What this does is check for whether either of the cells C2 , C3 contains a number ; if so , it checks for their difference , if not it outputs a null character so that the cell will display a blank.

Narayan
 
Hi ,

Apart from checking to see whether C2 , C3 are blank , another possibility is to check for whether they contain numbers.

Excel has an ISNUMBER function , which will return TRUE if a cell contains a number , and FALSE otherwise.

Thus , you can also use :

=IF(OR(ISNUMBER(C2),ISNUMBER(C3)),IF((C2-C3(<=2,1,),"")

What this does is check for whether either of the cells C2 , C3 contains a number ; if so , it checks for their difference , if not it outputs a null character so that the cell will display a blank.

Narayan

I use the IF(and...

It worked perfectly.

Thank You,

BL84
 
Back
Top