+ Reply to Thread
Results 1 to 5 of 5

Formula based on min & max from other cells

  1. #1
    Registered User
    Join Date
    05-29-2015
    Location
    Sheffield, England
    MS-Off Ver
    2013
    Posts
    3

    Formula based on min & max from other cells

    I am trying to use conditional formatting in a table based on the minimum and maximum values entered in other cells.

    Based on the picture file I have attached, for row 2 I am using the formula =OR($D2>$C2,$D2<$B2)

    If there are values in both columns (as per row 3) this formula works, but if the is nothing entered in the maximum column, the D column still turns red even when the figure is above the minimum.

    I need this formula to work even if one of the columns is left blank

    Can anyone advise me on how to fix this?

    element columns.jpg

  2. #2
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,658

    Re: Formula based on min & max from other cells

    Just give C2 a big value if it is blank:

    =OR($D2>IF($C2=0,10^10,$C2),$D2<$B2)
    Quang PT

  3. #3
    Registered User
    Join Date
    05-29-2015
    Location
    Sheffield, England
    MS-Off Ver
    2013
    Posts
    3

    Re: Formula based on min & max from other cells

    Yes I thought of that, but unfortunately this is an excel table in a word template that goes to our customers and does need to match the requirements of the specification involved, which doesn't always have a min & a max so I need to find a way to work around this without entering random values.

  4. #4
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,658

    Re: Formula based on min & max from other cells

    So do you expect 1.5 to be FALSE and not highlight if MIN is 1 and no MAX? that my solution did.

  5. #5
    Registered User
    Join Date
    05-29-2015
    Location
    Sheffield, England
    MS-Off Ver
    2013
    Posts
    3

    Re: Formula based on min & max from other cells

    I see what you mean now, thanks for that. Yes that fixed that problem but caused another one. there are also occasions where there are only maximums and no value in the minimum column. This new formula now doesn't highlight if the figure is above the maximum when there is no minimum stated?

+ 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 Needed to count a range of cells based on criteria in 2 other cells
    By excelteam777 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-01-2013, 04:06 PM
  2. Replies: 0
    Last Post: 03-13-2013, 12:25 PM
  3. [SOLVED] Formula to add cells based on like values and populated cells
    By rjlchef in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-04-2013, 10:38 PM
  4. Replies: 5
    Last Post: 10-15-2012, 06:33 PM
  5. Formula to copy and paste data in cells to other cells based on values
    By haleakala17 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 08-11-2012, 08:45 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