+ Reply to Thread
Results 1 to 4 of 4

formula not acting as it should

  1. #1
    Forum Contributor
    Join Date
    12-11-2013
    Location
    St Moritz, GR, Switzerland
    MS-Off Ver
    Excel 2010
    Posts
    187

    formula not acting as it should

    I use conditional formatting to highlight cells orange if the data in them is incorrect. I've entered

    =IF(OR(AND((AL2)="Yes"),(AM2="")),AL2="",(AND(AL2="No",AM2<>"")))

    In other words, if column AL is blank at all, go orange. Also go orange if AL says "No" but there's something in AM, or if AL says "Yes" but there isn't anything in AM.

    However, when AL says 'Yes' and AM is blank, it doesn't go orange. What's wrong with my formula?

    I've set it to act on range AM2:AM3000 ish.

  2. #2
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: formula not acting as it should

    First, you don't need the IF. Is AM2 really blank or is it "" returned by a formula? Try

    =IF(OR(AND((AL2)="Yes"),(ISBLANK(AM2))),ISBLANK(AL2),(AND(AL2="No",AM2<>""))
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,649

    Re: formula not acting as it should

    For conditional formatting, Try this........

    Please Login or Register  to view this content.
    Hope this helps.
    Regards
    sktneer


    Treat people the way you want to be treated. Talk to people the way you want to be talked to.
    Respect is earned NOT given.

  4. #4
    Forum Contributor
    Join Date
    12-11-2013
    Location
    St Moritz, GR, Switzerland
    MS-Off Ver
    Excel 2010
    Posts
    187

    Re: formula not acting as it should

    With an extra parenthesis ) Chemical :-)

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Formula's not working Properly, and acting completely bizarre!
    By Sky188 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-04-2012, 01:05 PM
  2. VLOOKUP not acting the way I think it should
    By RIKIL in forum Excel General
    Replies: 2
    Last Post: 05-28-2011, 04:16 AM
  3. workbook_open() acting too soon
    By psychocls in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 02-14-2009, 05:35 PM
  4. Formula Acting On Specific Workbooks
    By davehunter in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-31-2007, 06:36 PM
  5. VBE acting weird - help
    By dpenny in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-28-2006, 01:30 AM

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