+ Reply to Thread
Results 1 to 6 of 6

conditional formatting using a formula

Hybrid View

  1. #1
    Registered User
    Join Date
    11-16-2011
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    46

    conditional formatting using a formula

    Hi

    i am trying to set up a inspection sheet to highlight if a product is out of tolerance.

    e.g. product comes in and should be 100mm wide - it is measured and is 101mm wide and the tolerance is +/- 0.5 then it is out of tolerance and i would like the cell to change to red.

    this formula is the best shot at it:

    ="IF(OR($G$5=>0.5,$G$5=<0.5))"

    any ideas please as this clearly doesn't work lol

    thanks

  2. #2
    Forum Contributor
    Join Date
    04-29-2012
    Location
    nuneaton, England
    MS-Off Ver
    Office 365
    Posts
    371

    Re: conditional formatting using a formula

    hi Ninjabear.. for one you cant put """" in the if statement unless you want it to display that text.. and imo it is better to have a cell saying 0.5 then the formula can say =IF(OR($G$5>G1,$G$5<G1),TRUE,FALSE) but this wont work in conditional so you need to use =OR($G$5>G1,$G$5<G1) on conditional formatting

  3. #3
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: conditional formatting using a formula

    Hi

    A simple way using a helper(and hidden) column, let's say Column H, is this.

    In H5, use this

    =IF(OR(G5>100.5,G5<99.5),FALSE,TRUE)

    Then in CF rules of G5, use this.

    =H5=FALSE
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

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

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  4. #4
    Registered User
    Join Date
    11-16-2011
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    46

    Re: conditional formatting using a formula

    hi wayneg
    take it back it does work i had to have a cell with -0.5 as well as 0.5

    thanks
    very much

  5. #5
    Registered User
    Join Date
    11-16-2011
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    46

    Re: conditional formatting using a formula

    hi Wayneg

    that looks like what i was after but doesn't seem to work

    Hi Fortis1991

    the figure of 100mm was an example and could be anything so not sure that would work ?

    thanks for the replys and other ideas?...please

  6. #6
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: conditional formatting using a formula

    Try using a Lookup Table for your tolerences

    With the Table in G:F7, Nominal Sizes in C:C and Actual Sizes in Column D

    Condition 1
    Formula is:=
    =ABS($D2-$C2)>LOOKUP($C2,$G$2:$G$7,$H$2:$H$7)
    Columns A:B are for check purposes only, they can be deleted.

    You should be able to build variations based on this.
    Attached Files Attached Files
    If you need any more information, please feel free to ask.

    However,If this takes care of your needs, please select Thread Tools from menu above and set this topic to SOLVED. It helps everybody! ....

    Also
    اس کی مدد کرتا ہے اگر
    شکریہ کہنے کے لئے سٹار کلک کریں
    If you are satisfied by any members response to your problem please consider using the small Star icon bottom left of their post to show your appreciation.

+ 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