We’d like to remind Forumites to please avoid political debate on the Forum.

This is to keep it a safe and useful space for MoneySaving discussions. Threads that are – or become – political in nature may be removed in line with the Forum’s rules. Thank you for your understanding.

📨 Have you signed up to the Forum's new Email Digest yet? Get a selection of trending threads sent straight to your inbox daily, weekly or monthly!
The Forum now has a brand new text editor, adding a bunch of handy features to use when creating posts. Read more in our how-to guide

Tolerances in Excel

I want to work out the difference from a measurement, and its tolerance. So if I have a measurement of 24.235, and the tolerance is ± 0.25, and the figure is out of tolerance, I want to show the figure, but if the measurement is in tolerance, I want it to show 0.00. I want the out of tolerance figures not to show + or -, just the result. So -0.05 would show as 0.05.

Comments

  • megaginge
    megaginge Posts: 363 Forumite
    I don't understand.

    What are your inputs?

    Measurement
    Tolerance
    Figure?

    You'd have to input the figure right? Let's call this the Normal measurement

    If so I'd have 4 columns, 3 in one out

    Normal measure
    Actual Measure
    Allowed Tolerance
    Calculated Measure

    Calculated would apply the logic you are mentioning ... But then you also mention showing the tolerance measurement? which confuses me ...

    So you could have this setup (Top row A, second row B, 1 thru 4 respectively)
    Normal measure,	Actual measure,	Tolerance,	Calculated measure
    27.575,	27.6,	0.25,	0.00
    

    The only formula is in the Calculated measure field which does this:

    =IF((A2-B2<C2),"0.00",B2)

    But then I don't understand what you mean by tolerance. Do you want to show the difference from tolerance when tolerance is allowed? Should that be in the calculated measure field where I placed 0.00? Or somewhere else again?
    If you wanted it in the next field, do this...
    Difference from tolerance
    0.025
    

    The 0.025 field, which I have in E2, has this formula:

    =ABS(IF(D2="0.00",A2-B2,"N/A"))


    I have no idea if this helps as I don't understand the question, but enjoy.

    Dave
    Hello There. :beer:
  • Le_Kirk
    Le_Kirk Posts: 25,907 Forumite
    Part of the Furniture 10,000 Posts Photogenic Name Dropper
    Use IF statements. Example, IF the measurement is within tolerance, display 0.00 or out of tolerance display the figure. Then format the cell with the out of tolerance figure to be number only.
  • Robm1955
    Robm1955 Posts: 553 Forumite
    Part of the Furniture 100 Posts Photogenic
    Sorry for being a bit vague. We have to measure some components, and want to record the results. The target is 24 ± 0.25, so if they are in tolerance, I want to show 0.00, if they are out, I want to show by how much. eg 24.3 shows 0.05 out of tolerance.
  • megaginge
    megaginge Posts: 363 Forumite
    Robm1955 wrote: »
    Sorry for being a bit vague. We have to measure some components, and want to record the results. The target is 24 ± 0.25, so if they are in tolerance, I want to show 0.00, if they are out, I want to show by how much. eg 24.3 shows 0.05 out of tolerance.

    Adapt the usage of ABS and IF that I have provided in my examples, then.
    Hello There. :beer:
  • d0nkeyk0ng
    d0nkeyk0ng Posts: 873 Forumite
    Part of the Furniture 500 Posts Combo Breaker
    Just had a play in excel and I would go with something like:

    =IF(AND(D5>23.75,D5<24.25),B5,D5-B5

    OR

    =IF(AND(D11>C11,D11<E11),B11,D11-B11)

    B5 = target measurement
    C5 = min tolerance
    D5 = actual measurement
    E5 = max tolerance
    F5 = value (which is target measurement if in tolerance and difference if out of tolerance)
  • Ainsley1
    Ainsley1 Posts: 404 Forumite
    I don't know the reasoning for your chosen presentation of the OOT analysts you are doing but the method outlined above would possibly meet your need.

    However I would add that there is conditional formatting that could be used to highlight (colour, bold etc.) the results which helps to visualise the analysed data....
    ....but it does sound like you are doing some quality analysis and there are many proven methods for doing that such as run charts and six sigma methods amongst others that you perhaps should have a look at if you are doing this for business purposes and https://en.m.wikipedia.org/wiki/Seven_Basic_Tools_of_Quality might give you a starter. Recognised statistical and graphical methods ease presentation, understanding and completeness.
  • System
    System Posts: 178,410 Community Admin
    10,000 Posts Photogenic Name Dropper
    edited 7 July 2016 at 4:47PM
    Hi

    After reading the above I did this...

    5 Columns
    ACTUAL, DIFF, EXCESS, UNDER BY, OVER BY:
    (I interlaced the formulas as well).
    ###############################################
    Actual.......Diff............Formula
    22.00.........2.000.........=SUM(A5-24)
    25.00.........1.000.........=SUM(A6-24)
    24.00.........0.000..........=SUM(A7-24)

    then
    EXCESS....Formula
    YES...........=IF(((A5-24)<-0.25)OR((A5-24)>0.25),"YES"," ")
    YES...........=IF(((A6-24)<-0.25)OR((A6-24)>0.25),"YES"," ")
    ...................=IF(((A7-24)<-0.25)OR((A7-24)>0.25),"YES"," ")

    Followed by

    UNDER BY.......FORMULA
    1.750..................=IF((B6<-0.25),(B6 + 0.25)," " )
    .......................... =IF((B6<-0.25),(B6 + 0.25)," " )
    ...........................=IF((B7<-0.25),(B7 + 0.25)," " )


    OVER BY.........FORMULA
    ..........................=IF((B5>0.25),(B5 - 0.25)," " )
    0.75.................. =IF((B6>0.25),(B6 - 0.25)," " )
    ..........................=IF((B7>0.25),(B7 - 0.25)," " )



    Somewhat crude but does fit the criteria?
    This is a system account and does not represent a real person. To contact the Forum Team email forumteam@moneysavingexpert.com
  • andybirch
    andybirch Posts: 82 Forumite
    Part of the Furniture 10 Posts Combo Breaker
    This is my go at the answer:


    if A1 contains the value you want to assess and B1 shows the Standard and C1 shows the result, the formula in C1 would be:


    =IF(A1>(B1*1.25),A1-(B1*1.25),IF(A1<(B1*0.75),B1-A1,0))


    Hope it helps.




    Andy.
This discussion has been closed.
Meet your Ambassadors

🚀 Getting Started

Hi new member!

Our Getting Started Guide will help you get the most out of the Forum

Categories

  • All Categories
  • 353.5K Banking & Borrowing
  • 254.2K Reduce Debt & Boost Income
  • 455K Spending & Discounts
  • 246.6K Work, Benefits & Business
  • 602.9K Mortgages, Homes & Bills
  • 178.1K Life & Family
  • 260.6K Travel & Transport
  • 1.5M Hobbies & Leisure
  • 16K Discuss & Feedback
  • 37.7K Read-Only Boards

Is this how you want to be seen?

We see you are using a default avatar. It takes only a few seconds to pick a picture.