+ Reply to Thread
Results 1 to 4 of 4

Formula for difference between numbers

  1. #1
    Registered User
    Join Date
    04-30-2013
    Location
    Canada
    MS-Off Ver
    Excel 2003
    Posts
    4

    Formula for difference between numbers

    I need a formula to determine the difference between 4 numbers in a column, eg: 17,3,5,9.

    The first row gives me the smallest number 3, the second row gives me the difference between the smallest number (3) and the next smallest number (5), the third row gives me the difference between the second smallest (5) and third smallest (9) numbers. The formula I need has to determine the difference between the third smallest (9) and the largest (17) numbers. The last row gives me the difference between the highest number and 23. If the value is 0 then it displays this -

    The following formulas are what I used when I was working with 3 numbers in a column, now I need to change the formulas to work with 4 so some of these will need to change.

    I have the formula for the first row =MIN(T3:T6)
    the second row =IF(SMALL(T3:T6,2)-SMALL(T3:T6,1)=0,"-",SMALL(T3:T6,2)-SMALL(T3:T6,1))
    the third row =IF(SMALL(T3:T6,3)-SMALL(T3:T6,2)=0,"-",SMALL(T3:T6,3)-SMALL(T3:T6,2))
    fourth row ?
    fifth row =SUM(23-T3)
    Last edited by Lynngirl; 02-21-2017 at 08:00 PM.

  2. #2
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 365 version 2501
    Posts
    19,027

    Re: Formula for difference between numbers

    Try this for the fourth row: =IF(MAX(T3:T6)-SMALL(T3:T6,3)=0,"-",MAX(T3:T6)-SMALL(T3:T6,3))
    Try this for the fifth row: =IF(23-MAX(T3:T6)=0,"-",23-MAX(T3:T6))
    Let us know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  3. #3
    Registered User
    Join Date
    04-30-2013
    Location
    Canada
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Formula for difference between numbers

    It worked beautifully, thank you!!!

  4. #4
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 365 version 2501
    Posts
    19,027

    Re: Formula for difference between numbers

    You're Welcome and thank you for the feedback. Please take a moment to mark the thread as 'Solved' using the thread tools link above your first post. I hope that you have a blessed day.

+ 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. Formula for the difference between positive & negative numbers
    By buyshirts in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-15-2016, 07:11 AM
  2. [SOLVED] Formula to calculate difference between 2 numbers
    By sats43 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-18-2014, 04:53 AM
  3. [SOLVED] vba for difference btw 2 numbers
    By meezadahsra in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-09-2013, 05:16 AM
  4. Replies: 4
    Last Post: 09-12-2012, 10:31 PM
  5. Insert numbers of based upon difference of two numbers
    By excellentlearner in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 02-08-2012, 05:54 PM
  6. Difference between Numbers
    By Lost123 in forum Excel General
    Replies: 4
    Last Post: 03-26-2010, 02:05 PM
  7. [SOLVED] calculating the difference between 2 numbers
    By Darran in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 03:05 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