+ Reply to Thread
Results 1 to 13 of 13

Can Conditional Formatting Formulas have Multiple Statements

  1. #1
    Forum Contributor
    Join Date
    02-27-2008
    Posts
    134

    Can Conditional Formatting Formulas have Multiple Statements

    Can you have IF and AND statements in Conditional formatting formulas?

    I put this and I get an error: =IF(AND($G5=""($H5=<>"")) I was testing the water for adding and OR statment also. I really want if cell G5 is blank and cell H5 or I5 has text, then G5 should be red.

    Thanks,
    Attached Images Attached Images
    Last edited by Coors; 08-21-2009 at 11:22 AM. Reason: Better Title

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Conditional Formatting Formula

    Your post does not comply with Rule 1 of our Forum RULES. Your post title should accurately and concisely describe your problem, not your anticipated solution. Use terms appropriate to a Google search. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will be addressed according to the OP's experience in the forum: If you have less than 10 posts, expect (and respond to) a request to change your thread title. If you have 10 or more posts, expect your post to be locked, so you can start a new thread with an appropriate title.
    To change a Title on your post, click EDIT then Go Advanced and change your title, if 2 days have passed ask a moderator to do it for you.
    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.

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

    Re: Conditional Formatting Formula

    You're missing a comma between your AND arguments.
    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

  4. #4
    Forum Contributor
    Join Date
    02-27-2008
    Posts
    134

    Re: Conditional Formatting Formula

    Quote Originally Posted by ChemistB View Post
    You're missing a comma between your AND arguments.
    How?

    And can I include an OR statment for I5?

  5. #5
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Can Conditional Formatting Formulas have Multiple Statements

    Try

    =AND(G5="",OR(H5<>"",I5<>""))

  6. #6
    Forum Contributor
    Join Date
    02-27-2008
    Posts
    134

    Re: Can Conditional Formatting Formulas have Multiple Statements

    That works. I have another condition affecting I5.

    Thanks for the help

  7. #7
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Can Conditional Formatting Formulas have Multiple Statements

    Quote Originally Posted by Coors View Post
    That works. I have another condition affecting I5.

    Thanks for the help

    Not sure what/if there is a question here?

  8. #8
    Forum Contributor
    Join Date
    02-27-2008
    Posts
    134

    Re: Can Conditional Formatting Formulas have Multiple Statements

    I need to decode my data and attach the file.....it has to many conditions

  9. #9
    Forum Contributor
    Join Date
    02-27-2008
    Posts
    134

    Re: Can Conditional Formatting Formulas have Multiple Statements

    Here is the attached file.

    Basically everything works, but when you go back and delete g5 the conditions do not work.
    Attached Files Attached Files

  10. #10
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Can Conditional Formatting Formulas have Multiple Statements

    I am not sure what is different than what I helped you on in other threads of similar requests...

    ... what are the actual conditions you need to be met... in order of application.

  11. #11
    Forum Contributor
    Join Date
    02-27-2008
    Posts
    134

    Re: Can Conditional Formatting Formulas have Multiple Statements

    If you play around with the file. You fill all of row 5 out and then go back and delete G5 and A5:F5 will stay green as if it is complete. I want A5:F5 to be green only if all cells A5:I5 are complete.

  12. #12
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Can Conditional Formatting Formulas have Multiple Statements

    Select the cells in cells that only have that one condition and apply CF formula:

    =COUNTBLANK($A5:$I5)=0

    click Format and choose Green

    Then Select H5 and delete Condition 1.

    Then add new condition and put formula above and choose Green

    Repeat for I5

  13. #13
    Forum Contributor
    Join Date
    02-27-2008
    Posts
    134

    Re: Can Conditional Formatting Formulas have Multiple Statements

    Solved.......Thanks

+ 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