+ Reply to Thread
Results 1 to 5 of 5

Using MIN and MAX to display results in same cell in specific format

  1. #1
    Registered User
    Join Date
    04-14-2014
    Location
    USA
    MS-Off Ver
    Excel 2013
    Posts
    4

    Using MIN and MAX to display results in same cell in specific format

    I want to display (in the same cell) the minimum and maximum values from a range of cells. The formula I am using to do that is:

    '=MIN(range)&" - "&MAX(range)

    The resulting output shown in the cell is:
    1000 - 2000

    I want the cell to display:
    1,000 sf - 2,000 sf

    What is best way to set up the formula to perform the minimum and maximum value search and format the cell to display the values as desired with the comma separator and sf after each value?

  2. #2
    Forum Expert ConneXionLost's Avatar
    Join Date
    03-11-2009
    Location
    Victoria, Canada
    MS-Off Ver
    2010
    Posts
    2,952

    Re: Using MIN and MAX to display results in same cell in specific format

    How about:

    Please Login or Register  to view this content.
    Cheers,
    Would you like to say thanks? Please click the: " Add Reputation" button, on the grey bar below the post.

  3. #3
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Using MIN and MAX to display results in same cell in specific format

    Or maybe this

    =TEXT(MIN(A1:A4),"#,0")&" sf - "&TEXT(MAX(A1:A4),"#,0")&" sf"

    A
    B
    1
    2000
    1,000 sf - 2,000 sf
    2
    1254
    3
    1000
    4
    1300
    Last edited by AlKey; 04-14-2014 at 07:09 PM.
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  4. #4
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Re: Using MIN and MAX to display results in same cell in specific format

    You can do this with a user defined function

    Please Login or Register  to view this content.
    Open the VBA editor by hitting Alt F11.
    Insert a new module with Insert - Module
    Paste in the above function
    Go back to the sheet by hitting Alt F11.

    In a suitable cell, enter = MinMax(A1:A10) for example.

    Remember to save the workbook as a macro enabled workbook .xlsm


    Or by a more conventional formula

    =TEXT(MIN(A1:A10),"0,000") & " sf - " & TEXT(MAX(A1:A10),"0,000") & " sf"
    Martin

  5. #5
    Registered User
    Join Date
    04-14-2014
    Location
    USA
    MS-Off Ver
    Excel 2013
    Posts
    4

    Re: Using MIN and MAX to display results in same cell in specific format

    Thanks for the reply and info!

+ 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] Display Conditional Format Colour in VLOOKUP Results
    By gtudor in forum Excel General
    Replies: 2
    Last Post: 03-20-2014, 05:58 AM
  2. Replies: 6
    Last Post: 08-16-2012, 03:32 PM
  3. [SOLVED] Display results with currency format
    By izlopez in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 06-18-2012, 04:09 AM
  4. Replies: 4
    Last Post: 07-25-2010, 04:21 PM
  5. Lookup results from anouther worksheet and display specific ones
    By kanuvas in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-27-2008, 12:46 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