+ Reply to Thread
Results 1 to 3 of 3

IF formula - a cell contains zero

  1. #1
    Registered User
    Join Date
    05-26-2011
    Location
    London, England
    MS-Off Ver
    Excel 2013
    Posts
    71

    IF formula - a cell contains zero

    OK, I have a dilemma. I have a spreadsheet where users are required to enter a figure between 0 and 10, from a drop down.
    I need the cell next to it to guide the user, so if the cell is blank, it needs to say 'Please enter '0' here'. If the cell is not blank, it needs to display no duisance text to the side.

    another issue is that I have the initial help text only appearing dependnent on what is given in a previous cell... so in a nutshell, I need this 'please enter '0' here' guide sentence to be invisible, then appear when needed, then disappear as the user moves on in the sheet...

    So far, I have the following:

    =IF(OR(J8="",J8="National Pay Scale",J8="Mix of National and London Pay Scales"),"","Please enter '0' here")

    I though this may work:

    =IF(OR(J8="",J8="National Pay Scale",J8="Mix of National and London Pay Scales", J12=0),"","Please enter '0' here")
    ...however, if cell J12 is blank as it is in the first instance, it treats it the same as entering a '0' in so the guide text never appears!!!

  2. #2
    Registered User
    Join Date
    04-11-2012
    Location
    Godzone
    MS-Off Ver
    Excel 2003
    Posts
    15

    Re: IF formula - a cell contains zero

    Hello,

    try to check if J12 is a number. If it is, then check if it's a 0. That will distinguish it from a blank cell.

    =IF(OR(J8="",J8="National Pay Scale",J8="Mix of National and London Pay Scales", AND(ISNUMBER(J12),J12=0)),"","Please enter '0' here")

  3. #3
    Registered User
    Join Date
    05-26-2011
    Location
    London, England
    MS-Off Ver
    Excel 2013
    Posts
    71

    Re: IF formula - a cell contains zero

    Almost.... I needed to add a >=0 in, not just =0. thank you though!
    =IF(OR(J8="",J8="National Pay Scale",J8="Mix of National and London Pay Scales", AND(ISNUMBER(J12),J12>=0)),"","Please enter '0' here")

+ 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