+ Reply to Thread
Results 1 to 14 of 14

Excel 2007 : IF(AND( conditional Formula Problem

  1. #1
    Registered User
    Join Date
    09-15-2010
    Location
    Here, Now
    MS-Off Ver
    Excel 2007
    Posts
    13

    IF(AND( conditional Formula Problem

    I'm trying to make a conditional statement that will Add its own text if the conditions are met. Can some one review it and tell me why they think its not working?

    =IF(AND(ISBLANK($B9),(NOT($W9=0))),OFF,,)
    Last edited by SIXFORTYSIX; 09-23-2010 at 03:05 PM. Reason: not working correctly

  2. #2
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: IF(AND( conditional Formula Problem

    If you want to display text as the result of the IF, you need to wrap that text in quotes. There are only two words that can stand without quotes, i.e. the Boolean values True or False.

    Also, your formula has too many commas.

    Try

    =IF(AND(ISBLANK($B9),(NOT($W9=0))),"OFF",FALSE)

  3. #3
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: IF(AND( conditional Formula Problem

    And more parens than it needs:

    =IF(AND(ISBLANK($B9), $W9<>0), "OFF", "what it should say otherwise")
    Entia non sunt multiplicanda sine necessitate

  4. #4
    Registered User
    Join Date
    09-15-2010
    Location
    Here, Now
    MS-Off Ver
    Excel 2007
    Posts
    13

    Re: IF(AND( conditional Formula Problem

    Many thanks!

  5. #5
    Registered User
    Join Date
    09-15-2010
    Location
    Here, Now
    MS-Off Ver
    Excel 2007
    Posts
    13

    Re: IF(AND( conditional Formula Problem

    Quote Originally Posted by teylyn View Post
    =IF(AND(ISBLANK($B9),(NOT($W9=0))),"OFF",FALSE)
    Quote Originally Posted by shg View Post

    =IF(AND(ISBLANK($B9), $W9<>0), "OFF", "what it should say otherwise")

    I've tried both above but it isn't displaying either of my text.

  6. #6
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: IF(AND( conditional Formula Problem

    What's in B9, does it contain a formula?
    Audere est facere

  7. #7
    Registered User
    Join Date
    09-15-2010
    Location
    Here, Now
    MS-Off Ver
    Excel 2007
    Posts
    13

    Re: IF(AND( conditional Formula Problem

    Quote Originally Posted by daddylonglegs View Post
    What's in B9, does it contain a formula?
    B9 is a cell that is formatted for Time. By default it is blank.
    It doesn't contain any formulas

  8. #8
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: IF(AND( conditional Formula Problem

    So if you use this formula

    =IF(AND(ISBLANK($B9), $W9<>0), "OFF", "what it should say otherwise")

    ....and B9 is blank and W9 is, say, 4 then you should get "OFF"? Is that what you expect. Does the formula work in that scenario?

  9. #9
    Registered User
    Join Date
    09-15-2010
    Location
    Here, Now
    MS-Off Ver
    Excel 2007
    Posts
    13

    Re: IF(AND( conditional Formula Problem

    Quote Originally Posted by daddylonglegs View Post
    So if you use this formula

    =IF(AND(ISBLANK($B9), $W9<>0), "OFF", "what it should say otherwise")

    ....and B9 is blank and W9 is, say, 4 then you should get "OFF"? Is that what you expect. Does the formula work in that scenario?
    Yep thats what I'm looking for for the end result... but its not giving me any output.

  10. #10
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: IF(AND( conditional Formula Problem

    Well, that formula can only give three possible results, OFF, what it should say otherwise or an error

    Are you saying it returns nothing (a blank)?

    Try checking the formatting of the cell with the formula and make sure it's set to general

  11. #11
    Registered User
    Join Date
    09-15-2010
    Location
    Here, Now
    MS-Off Ver
    Excel 2007
    Posts
    13

    Re: IF(AND( conditional Formula Problem

    Quote Originally Posted by daddylonglegs View Post
    Are you saying it returns nothing (a blank)?
    Nope not returning a blank, I'm not getting an error... It's just not working...

  12. #12
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: IF(AND( conditional Formula Problem

    What does it return, then? "Not working" is not good enough. What would you expect to be returned? Give concrete examples. Maybe it's time to post a workbook!!

  13. #13
    Registered User
    Join Date
    09-15-2010
    Location
    Here, Now
    MS-Off Ver
    Excel 2007
    Posts
    13

    Re: IF(AND( conditional Formula Problem

    Quote Originally Posted by teylyn View Post
    What does it return, then? "Not working" is not good enough. What would you expect to be returned? Give concrete examples. Maybe it's time to post a workbook!!
    Well it doesn't return anything.... The cell just stays as is, blank.

  14. #14
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: IF(AND( conditional Formula Problem

    post a workbook.

+ 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