+ Reply to Thread
Results 1 to 5 of 5

Conditional formatting a range

  1. #1
    Registered User
    Join Date
    12-02-2008
    Location
    London
    Posts
    51

    Conditional formatting a range

    Hi, I would like to format cells b2:d16 based on the value of corresponding cells in f2:h16. I would like cells in b2:d16 to be filled red if corresponding cells in f2:h16 greater than 0 (zeros are "-") and less than/= 25, and green if greater than/= 75. I've been trying for ages and no luck. Help greatly appreciated. I have manually coloured first data row in attached.

    Many thanks,

    Adam
    Attached Files Attached Files

  2. #2
    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
    43,974

    Re: Conditional formatting a range

    Use this:

    =AND(F2>0,F2<=25)

    and this:
    =AND(F2>0,F2>=75)
    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

  3. #3
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,688

    Re: Conditional formatting a range

    Select all the data from B2 to D16, then click on Conditional Formatting | New Rule | Use a formula... ,then put this formula in the dialogue box which pops up:

    =AND(F2>0,F2<=25)

    Then click on the Format button | Fill tab and choose red, then OK your way out.

    Repeat for the same selection, but use this formula:

    =F2>=75

    and set the colour to green.

    Excel will automatically adjust those cell references to suit the selected cells, so you only have to set this up once.

    Hope this helps.

    Pete

  4. #4
    Registered User
    Join Date
    12-02-2008
    Location
    London
    Posts
    51

    Re: Conditional formatting a range

    Thanks both, that's sorted and I appreciate your help, I do find conditional formatting so complicated!

  5. #5
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,688

    Re: Conditional formatting a range

    Glad to help - thanks for the rep.

    Pete

+ 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] Apply Conditional Formatting to Custom Range if Cell Value Outside Range is ____
    By eNinjaInTraining in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-07-2019, 04:09 PM
  2. [SOLVED] Conditional formatting one range containing text from another range
    By thedeakster in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-01-2013, 05:00 PM
  3. Replies: 3
    Last Post: 08-13-2013, 09:44 AM
  4. Conditional Formatting via VBA: Change formatting in range based on value of each cell
    By ralphjmedia in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-12-2013, 10:37 AM
  5. [SOLVED] Applying Conditional Formatting to a Range in VBA (range is set by variables)
    By JungleJme in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 04-12-2013, 08:32 AM
  6. Conditional Formatting - Grey Out and Lock A range based on a cell value in that range
    By Excelgnome in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-14-2012, 07:31 PM
  7. Replies: 2
    Last Post: 10-06-2005, 03:05 PM

Tags for this Thread

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