+ Reply to Thread
Results 1 to 8 of 8

How? Ignore cell if blank in an IF formula.

  1. #1
    Registered User
    Join Date
    03-19-2008
    Posts
    28

    Question How? Ignore cell if blank in an IF formula.

    I have 2 cells I am monitoring.

    Cell K18 has the highest number that was last entered (numbers are sequential).

    I18 is blank until new number is entered.

    I19 is the cell I have this formula in.
    =IF(K18+1=I18,"","OUT OF SEQUENCE")

    I want this cell to return a statement only if the number, when entered into cell I18 is NOT the next number in the sequence (OUT OF SEQUENCE), which would be K18+1.
    I want no statement if blank or is the correct number, although I could put up with an "OK" if I can get it when the correct number is entered or when cell is blank.
    Thanks

  2. #2
    Forum Expert darkyam's Avatar
    Join Date
    03-05-2008
    Location
    Houston, TX
    MS-Off Ver
    2013
    Posts
    2,191
    =if(or(i18="",k18+1=i18),"","Out Of Sequence")

  3. #3
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Not sure I understand... it seems your current formula does what you require... am I missing something?
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  4. #4
    Forum Expert darkyam's Avatar
    Join Date
    03-05-2008
    Location
    Houston, TX
    MS-Off Ver
    2013
    Posts
    2,191
    I18, if blank, does not equal K18+1 if K18 is the max value in a range, so the formula now in I19 would return "Out of Sequence" until a correct number is entered.

  5. #5
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    I guess I may have assumed there was always an entry in I18...

  6. #6
    Registered User
    Join Date
    03-19-2008
    Posts
    28

    Reply to NBVC

    Current formula returns statement if incorrect number is entered as needed, BUT also returns same statement if cell is blank as cell always is until an entry is made.

    I am trying to have this as an alert if someone else enters a number that is out of sequence.

    I need it not to say anything if cell remains blank or the corrrect number is entered. Can the blank cell be ignored?

  7. #7
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Quote Originally Posted by n2lectual
    Current formula returns statement if incorrect number is entered as needed, BUT also returns same statement if cell is blank as cell always is until an entry is made.

    I am trying to have this as an alert if someone else enters a number that is out of sequence.

    I need it not to say anything if cell remains blank or the corrrect number is entered. Can the blank cell be ignored?
    Did you see darkyam's response... I think he took care of that.

  8. #8
    Registered User
    Join Date
    03-19-2008
    Posts
    28

    Smile Reply to darkyam WORKS Thanks

    Works, Thanks to all for the replies.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1