+ Reply to Thread
Results 1 to 5 of 5

Determine whether values in 3 cells differ by more than 20%

  1. #1
    Registered User
    Join Date
    08-25-2014
    Location
    Oz
    MS-Off Ver
    2010
    Posts
    2

    Determine whether values in 3 cells differ by more than 20%

    Hello,

    I have three columns of values and on each row I would like to know if they differ from each other by more than 20%.

    For example:

    Column A Column B Column C Column D
    First Second Third Differ?
    100 95 105 No
    100 70 105 Yes

    It doesn't matter which one is higher or lower. Basically I want to know IF ( |A-B|/A > 0.2 OR |B-A|/B > 0.2 OR |A-C|/A > 0.2 OR |C-A|/C > 0.2 OR |B-C|/B > 0.2 OR |C-B|/C > 0.2 )

    I wasn't sure if there was a more elegant solution than the Excel equivalent of the above IF statement. Many thanks for your time.

  2. #2
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,648

    Re: Determine whether values in 3 cells differ by more than 20%

    Hi rndmwrd,
    Welcome to the Forum.

    May be this.....
    Assuming your numbers are in A2,B2 and C2, then
    In D2
    Please Login or Register  to view this content.
    Is this what you are trying to achieve?
    Regards
    sktneer


    Treat people the way you want to be treated. Talk to people the way you want to be talked to.
    Respect is earned NOT given.

  3. #3
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,648

    Re: Determine whether values in 3 cells differ by more than 20%

    In the last reply I assumed that you are comparing the third number with other two numbers.
    But if you are comparing all the three numbers, may be this would work...

    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    08-25-2014
    Location
    Oz
    MS-Off Ver
    2010
    Posts
    2

    Re: Determine whether values in 3 cells differ by more than 20%

    Many thanks sktneer! As I want to compare the three numbers your second suggestion is the winner.

    Not only did you help me with Excel but you also simplified my clunky logic. I could compare all 6 possibilities but it makes more sense to just compare the max and min and compare those to 20% of min

  5. #5
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,648

    Re: Determine whether values in 3 cells differ by more than 20%

    Glad to help. Thanks for the feedback.
    I don't know how could I manage to help since my maths is very poor indeed.

    If that takes care of your question, please mark your thread as Solved by selecting Thread Tools (just above your first post) --> Mark thread as solved.

+ 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: 1
    Last Post: 08-10-2011, 06:40 AM
  2. Add colored line when field values differ
    By Jeff M in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-20-2011, 04:58 PM
  3. Formula to add a blank row if 2 values differ
    By Jeff M in forum Excel General
    Replies: 1
    Last Post: 05-19-2010, 01:24 PM
  4. Determine Values in cells
    By esupply in forum Excel General
    Replies: 2
    Last Post: 10-27-2009, 11:01 AM
  5. using cells values to determine macro action
    By simonsmith in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-16-2006, 03:03 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