+ Reply to Thread
Results 1 to 15 of 15

Thread: Using IF(AND conditional formatting.

  1. #1
    Registered User
    Join Date
    10-19-2011
    Location
    Boston, USA
    MS-Off Ver
    Excel 2007
    Posts
    22

    Using IF(AND conditional formatting.

    Can someone let me know if it is possible in to use something like an IF(AND formula in conditional formatting?


    I am trying to have a Cell (Q26) have a colored fill appear if the following is True: If (K26) is >0, and Q26 is blank?

    I can't seem to figure this formatting out. Any suggestions?
    Last edited by dancor31; 01-27-2012 at 10:27 AM.

  2. #2
    Forum Guru TMShucks's Avatar
    Join Date
    07-15-2010
    Location
    Manchester, England
    MS-Off Ver
    MSO 2003 & 2007
    Posts
    6,199

    Re: Using IF(AND conditional formatting.

    =AND($K26>0,$Q26="")


    You don't need IF


    Regards, TMS

  3. #3
    Registered User
    Join Date
    10-19-2011
    Location
    Boston, USA
    MS-Off Ver
    Excel 2007
    Posts
    22

    Re: Using IF(AND conditional formatting.

    doesnt seem to work for me

  4. #4
    Forum Guru TMShucks's Avatar
    Join Date
    07-15-2010
    Location
    Manchester, England
    MS-Off Ver
    MSO 2003 & 2007
    Posts
    6,199

    Re: Using IF(AND conditional formatting.

    Post a sample workbook

  5. #5
    Registered User
    Join Date
    10-19-2011
    Location
    Boston, USA
    MS-Off Ver
    Excel 2007
    Posts
    22

    Re: Using IF(AND conditional formatting.

    sample.xlsx

    here is a sample of the spreadsheet

  6. #6
    Valued Forum Contributor OnErrorGoto0's Avatar
    Join Date
    12-30-2011
    Location
    I DO NOT POST HERE ANYMORE
    MS-Off Ver
    I DO NOT POST HERE ANYMORE
    Posts
    1,647

    Re: Using IF(AND conditional formatting.

    I cannot really see how that relates to your question?
    Good luck.

  7. #7
    Forum Guru TMShucks's Avatar
    Join Date
    07-15-2010
    Location
    Manchester, England
    MS-Off Ver
    MSO 2003 & 2007
    Posts
    6,199

    Re: Using IF(AND conditional formatting.

    I guess it's not going to work if you test a field with TEXT in it against zero (0).

    And, although you refer to row 26 in your question, there's nothing in that row in your sample data.

    Assuming you want something that works on row 3:

    =AND($K3<>"",$Q3="") ... applied to range: =$Q$3:$Q$15


    And I would suggest that you get rid of all the merged cells ... they won't help you when you try to apply this to a range of cells.


    Regards, TMS

  8. #8
    Forum Guru TMShucks's Avatar
    Join Date
    07-15-2010
    Location
    Manchester, England
    MS-Off Ver
    MSO 2003 & 2007
    Posts
    6,199

    Re: Using IF(AND conditional formatting.

    @OnErrorGoto0; quite so.

  9. #9
    Registered User
    Join Date
    10-19-2011
    Location
    Boston, USA
    MS-Off Ver
    Excel 2007
    Posts
    22

    Re: Using IF(AND conditional formatting.

    sample2.xlsx

    I had created a mock spreadsheet to simplify things but I guess I complicated it more. I have now attached the actual sheet that I am using.

    I am trying to have Q28,Q30,Q32,Q34,Q36,Q38,Q40 be conditionally formatted so that if X18=Maintenance Visit AND Q28 (or any other of the Qcells listed) are blank, the cell then has a pink fill the same as other cells on the sheet.

    If ISBLANK or = Service Visit, the Qcells listed have no fill.

    Attached is the actual sheet rather than a mockup.
    Last edited by dancor31; 01-25-2012 at 12:46 PM.

  10. #10
    Forum Guru TMShucks's Avatar
    Join Date
    07-15-2010
    Location
    Manchester, England
    MS-Off Ver
    MSO 2003 & 2007
    Posts
    6,199

    Re: Using IF(AND conditional formatting.

    =AND($X$18<>"",$Q28="") ... applied to: =$Q$28:$Q$40


    Regards, TMS

  11. #11
    Valued Forum Contributor Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens Greece
    MS-Off Ver
    Excel 2003
    Posts
    2,296

    Re: Using IF(AND conditional formatting.

    Hi Dancor

    Take a look to the example.

    Hope to helps you.
    Attached Files Attached Files
    Regards

    Fotis.

    I am proud that i am Greek.

    Just to know every one.We Greeks, we are nοt proud of our politicians. Υou?

    Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Please,mark your thread [SOLVED] if you received your answer.


    My Avadar picture, is from Athens Acropolis.
    http://www.theacropolismuseum.gr

    http://www.visitgreece.gr/

  12. #12
    Registered User
    Join Date
    10-19-2011
    Location
    Boston, USA
    MS-Off Ver
    Excel 2007
    Posts
    22

    Re: Using IF(AND conditional formatting.

    Thanks for all the help. This still isnt working for me, even when I open the example that it doesnt work. Thanks for taking the time and effort to add that.

    just to be sure we are on the same page, I need the cell Q28 to display a pink fill when blank, but only if X18 is displaying "Maintenance Mode" at the same time.

  13. #13
    Valued Forum Contributor Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens Greece
    MS-Off Ver
    Excel 2003
    Posts
    2,296

    Re: Using IF(AND conditional formatting.

    ….just to be sure we are on the same page, I need the cell Q28 to display a pink fill when blank, but only if X18 is displaying "Maintenance Mode" at the same time.

    ...Excuse me. Do you mean that the sample workbook that i attached for you, does not do this??

    As many times to test it, it's does exactly this!

    Pls take a look again....
    Regards

    Fotis.

    I am proud that i am Greek.

    Just to know every one.We Greeks, we are nοt proud of our politicians. Υou?

    Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Please,mark your thread [SOLVED] if you received your answer.


    My Avadar picture, is from Athens Acropolis.
    http://www.theacropolismuseum.gr

    http://www.visitgreece.gr/

  14. #14
    Forum Guru TMShucks's Avatar
    Join Date
    07-15-2010
    Location
    Manchester, England
    MS-Off Ver
    MSO 2003 & 2007
    Posts
    6,199

    Re: Using IF(AND conditional formatting.

    @dancor31: I think it's time you made a bit of an effort to fix this for yourself.

    Despite you keep moving the goalposts and providing not very relevant examples, Fotis and I have tried to give you suitable formulae and ranges to address your needs.

    You need an AND statement that checks an absolute address against one condition/value and a fixed column/variable row against another.

    If you're going to learn this stuff, you need to experiment ... you're not going to break anything.

    TMS

  15. #15
    Registered User
    Join Date
    10-19-2011
    Location
    Boston, USA
    MS-Off Ver
    Excel 2007
    Posts
    22

    Re: Using IF(AND conditional formatting.

    Fotis,


    I just relized that I was looking at your sheet wrong. My bad, it works great. Thank you so much for your help.

+ 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.2.0