Share via

Combining ISBLANK with IF OR formula

Anonymous
2012-10-08T12:50:40+00:00

I am getting an error when using the following formula, if a cell is blank in cell HB2. I would like the end result to be blank.

{=if(ISBLANK(HB2),"",IF(OR(HF2<1,HB2>E2),"Yes","No"))}

Note: HB2 has a formula in the cell

Thank you for any assistance.

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

  1. Anonymous
    2012-10-08T13:02:01+00:00

    A cell containing zero length string (e.g. "") is not the same as a blank cell and that may be part of the problem. If the formula in HB2 is an IF() that passes "" as one of the possible outcomes, you should check for LEN() rather than ISBLANK(). The latter covers both blank and zero length strings. Try,

    =IF(LEN(HB2),IF(OR(HF2<1,HB2>E2),"Yes","No"),"")

    Used in this manner, the LEN() will resolve to a FALSE for a zero length string or a blank in HB2. Anything else will be TRUE.

    There is no need to make this an array formula; a simple Enter will sufffice.

    2 people found this answer helpful.
    0 comments No comments

2 additional answers

Sort by: Most helpful
  1. Ashish Mathur 101.8K Reputation points Volunteer Moderator
    2012-10-09T00:04:36+00:00

    Hi,

    Try this

    =If(HB2="","",IF(OR(HF2<1,HB2>E2),"Yes","No"))

    Hope this helps.

    5 people found this answer helpful.
    0 comments No comments
  2. Anonymous
    2012-10-08T13:13:45+00:00

    Thank you that works perfectly.

    0 comments No comments