+ Reply to Thread
Results 1 to 8 of 8

'IF' 'AND' function in conditonal formatting to change cell colour

  1. #1
    Forum Contributor
    Join Date
    06-28-2009
    Location
    newcastle, uk
    MS-Off Ver
    Excel 2010
    Posts
    187

    'IF' 'AND' function in conditonal formatting to change cell colour

    hi all

    i have a sheet where cells 'A' are full of numbers aswell as cells 'B'.

    i'm wanting to set up a formula so that IF cell 'A' is less that 6.50 'AND' cell 'B' is greater than 9, change the colour of cell 'A' to red.

    i can see i can use condtional formatting for one of these ie if A is less than 6.50, but I cant seem to set it up for the two sets of criterias.

    Thanks in advance

    Gemma
    Last edited by batjl9; 01-25-2018 at 02:55 PM.

  2. #2
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,914

    Re: 'IF' 'AND' function in conditonal formatting to change cell colour

    =AND(A1<6.5,B1>9)
    May be the above
    Samba

    Say thanks to those who have helped you by clicking Add Reputation star.

  3. #3
    Forum Contributor
    Join Date
    06-28-2009
    Location
    newcastle, uk
    MS-Off Ver
    Excel 2010
    Posts
    187

    Re: 'IF' 'AND' function in conditonal formatting to change cell colour

    ive attached the actual pivot table im using. for some reason the above formula doesnt appear to work.
    Attached Files Attached Files

  4. #4
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: 'IF' 'AND' function in conditonal formatting to change cell colour

    Based on your sample from post #3, try this:

    Click on the top part of B3 (where the mouse pointer turns into a downward arrow) to select the entire "avg field" column > Conditional Formatting > New Rule > Use a formula

    =AND(B4<6.5,C4>9)

    Format: Fill however you'd like > OK

  5. #5
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: 'IF' 'AND' function in conditonal formatting to change cell colour

    See modified file. i changed to colour for checking prurposes...
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  6. #6
    Forum Contributor
    Join Date
    06-28-2009
    Location
    newcastle, uk
    MS-Off Ver
    Excel 2010
    Posts
    187

    Re: 'IF' 'AND' function in conditonal formatting to change cell colour

    thanks all, its working brilliantly.

  7. #7
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: 'IF' 'AND' function in conditonal formatting to change cell colour

    You're welcome. Glad we could help.

  8. #8
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: 'IF' 'AND' function in conditonal formatting to change cell colour

    You're welcome.



    If that takes care of your original question, please select "Thread Tools" from the menu link above and mark this thread as SOLVED.

    It'd also be appreciated if you were to click the Add Reputation button at the foot of any of the posts of all members who helped you reach a solution.

+ 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. Replies: 6
    Last Post: 04-11-2016, 09:48 AM
  2. How can I change the range in conditonal formatting
    By JPWin in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-01-2015, 12:19 AM
  3. [SOLVED] Conditional Formatting change cell colour base on value
    By robrobet in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-24-2014, 12:34 AM
  4. [SOLVED] Conditional Formatting to Change Cell Colour Based on Date
    By Kym2101 in forum Excel General
    Replies: 5
    Last Post: 05-01-2012, 11:41 PM
  5. [SOLVED] Can I change a cell colour using an IF formula, not conditional formatting?
    By suxrule in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 01-29-2012, 10:52 AM
  6. Change colour in a cell - conditional formatting?
    By ionistis in forum Excel General
    Replies: 9
    Last Post: 12-04-2008, 03:38 PM
  7. Function to change the colour of the cell.
    By udaymaddu in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-13-2008, 11:10 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