+ Reply to Thread
Results 1 to 7 of 7

Pulling the smallest digit from a 3 digit cell

  1. #1
    Forum Contributor
    Join Date
    11-13-2010
    Location
    Warren, Michigan
    MS-Off Ver
    Excel 2008 for Mac
    Posts
    307

    Pulling the smallest digit from a 3 digit cell

    A1 is 315
    Obviously the smallest digit in cell A1 is "1"

    So, in C1 what would the formula be to puck the 1 from the A1 3 digit cell and place in C1?

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Pulling the smallest digit from a 3 digit cell

    a
    b
    c
    1
    613
    1
    b1: =min(--mid(a1, {1,2,3}, 1))
    2
    836
    3
    3
    558
    5
    4
    768
    6
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,885

    Re: Pulling the smallest digit from a 3 digit cell

    As the question was specific to 3-digit cells, shg's formula should suffice. If you (or anyone reading this) would like to be able to find the minimum value in a random-length numeric string, you could try the following array formula (must use CTRL+SHIFT+ENTER to confirm):
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  4. #4
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Pulling the smallest digit from a 3 digit cell

    shg's formula is for 3 digits only. For a cell with any number of digits use this array formula

    =MIN(--MID(A1,ROW(INDIRECT("1:"&LEN(A1))),1))
    Life's a spreadsheet, Excel!
    Say thanks, Click *

  5. #5
    Forum Expert JLGWhiz's Avatar
    Join Date
    02-20-2011
    Location
    Florida, USA
    MS-Off Ver
    Windows 10, Excel 2013
    Posts
    2,070

    Re: Pulling the smallest digit from a 3 digit cell

    Or you can put a vba function in your code module1 and use it like a worksheet function.

    Please Login or Register  to view this content.
    If value in cell A1 = 315 then in the cell where you want the value returned put
    Please Login or Register  to view this content.
    Any code provided by me should be tested on a copy or a mock up of your original data before applying it to the original. Some events in VBA cannot be reversed with the undo facility in Excel. If your original post is satisfied, please mark the thread as "Solved". To upload a file, see the banner at top of this page.
    Just when I think I am smart, I learn something new!

  6. #6
    Registered User
    Join Date
    10-20-2017
    Location
    Pacific Time
    MS-Off Ver
    2010
    Posts
    5

    Re: Pulling the smallest digit from a 3 digit cell

    Brilliant ideas above I am saving them.

    I have to offer my simple solution though, if you have columns to spare,
    just expand and do the min. That should get the work done if you are
    not really into programming.

  7. #7
    Forum Expert
    Join Date
    07-06-2004
    Location
    Northern California
    MS-Off Ver
    2K, 2003, 2010, O365
    Posts
    1,490

    Re: Pulling the smallest digit from a 3 digit cell

    =MATCH(TRUE,ISNUMBER(FIND({0;1;2;3;4;5;6;7;8;9},A1)),0)-1

    which handles any number of characters in A1, returns #N/A if there are no decimal numerals at all in A1, but ignores other characters when there's at least 1 decimal numeral in A1.

+ 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. Color a single digit in a mult-digit number cell
    By Phyllis in forum Excel General
    Replies: 8
    Last Post: 09-30-2022, 04:22 PM
  2. Google Sheets: Sum each digit in Cell to Double and Single Digit
    By rbhapkar in forum For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Replies: 11
    Last Post: 12-27-2019, 08:41 AM
  3. Google Sheets: Sum each digit in Cell to Double and Single Digit
    By rbhapkar in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-24-2019, 01:47 AM
  4. Replies: 6
    Last Post: 02-03-2019, 06:05 AM
  5. [SOLVED] Formula to take off the last digit and replace it with a digit in another cell
    By Losguapos1 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-13-2017, 01:34 PM
  6. Replies: 17
    Last Post: 02-02-2016, 05:05 AM
  7. [SOLVED] LOTTERY FILTER#4, Find if 1 Digit Sum of 2 Digit or 3 Digit, Single Cell w/ dash
    By david gonzalez in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-08-2014, 12:57 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