+ Reply to Thread
Results 1 to 9 of 9

Formula To Only List Numbers

  1. #1
    Registered User
    Join Date
    07-09-2014
    Location
    London
    MS-Off Ver
    2010
    Posts
    4

    Formula To Only List Numbers

    Hello


    I have a list of information that has a mix of cells with numbers and words and I am looking for a formal to list only the cell with numbers.

    As Below

    10 10
    DAY 30
    30 20
    DOG
    20

    However I need the vales in the second column to update if the values change in the first column.


    thanks For your help

  2. #2
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,064

    Re: Formula To Only List Numbers

    in B1
    =IFERROR(INDEX($A$1:$A$100,SMALL(IF(ISNUMBER($A$1:$A$100),ROW($A$1:$A$100)),ROW(A1)),1),"")
    Array formula, use Ctrl-Shift-Enter

    and copy down for as many rows as you have in column A
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  3. #3
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,178

    Re: Formula To Only List Numbers

    Try

    =IFERROR(INDEX(A:A,SMALL(IF(ISNUMBER($A$2:$A$100),ROW($A$2:$A$100),""),ROWS($A$2:A2))),"")

    ...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer.

  4. #4
    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: Formula To Only List Numbers

    Here is a regular formula
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    and this regular is for users of Excel 2010 and up
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    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

  5. #5
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Formula To Only List Numbers

    If your dataset is in fact quite large, I recommend avoiding potentially resource-heavy IFERROR set-ups (see here for an explanation).

    Use a single helper cell somewhere within the worksheet to calculate the number of numerics within the range, and reference that within the main formulas. For example, using C1 for this purpose, we would enter, in that cell:

    =COUNT(A1:A100)

    The main array formula is then:

    =IF(ROWS($1:1)>C$1,"",INDEX(A:A,SMALL(IF(ISNUMBER(A$1:A$100),ROW(A$1:A$100)),ROWS($1:1))))

    What's more, if the order of returns of those numbers does not have to correspond with their order within the original list, simply:

    =SMALL(A$1:A$100,ROWS($1:1))

    which will be far, far more efficient than the above.

    Regards
    Click * below if this answer helped

    Advanced Excel Techniques: http://excelxor.com/

  6. #6
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,064

    Re: Formula To Only List Numbers

    Quote Originally Posted by XOR LX View Post
    If your dataset is in fact quite large, I recommend avoiding potentially resource-heavy IFERROR set-ups (see here for an explanation).

    Use a single helper cell somewhere within the worksheet to calculate the number of numerics within the range, and reference that within the main formulas. For example, using C1 for this purpose, we would enter, in that cell:

    =COUNT(A1:A100)

    The main array formula is then:

    =IF(ROWS($1:1)>C$1,"",INDEX(A:A,SMALL(IF(ISNUMBER(A$1:A$100),ROW(A$1:A$100)),ROWS($1:1))))

    What's more, if the order of returns of those numbers does not have to correspond with their order within the original list, simply:

    =SMALL(A$1:A$100,ROWS($1:1))

    which will be far, far more efficient than the above.

    Regards
    This is still an array formula then?

  7. #7
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Formula To Only List Numbers

    Quote Originally Posted by Special-K View Post
    This is still an array formula then?
    Which one?

    Regards

  8. #8
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,064

    Re: Formula To Only List Numbers

    The IF ROWS... you posted.

    Looks like it is.
    Nice alternative.

  9. #9
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Formula To Only List Numbers

    Quote Originally Posted by Special-K View Post
    This is still an array formula then?
    Quote Originally Posted by XOR LX View Post
    The main array formula is then:

    =IF(ROWS($1:1)>C$1,"",INDEX(A:A,SMALL(IF(ISNUMBER(A$1:A$100),ROW(A$1:A$100)),ROWS($1:1))))
    Indeed it is!

+ 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 or macro to list all numbers between two numbers
    By clarion419 in forum Excel General
    Replies: 2
    Last Post: 07-09-2016, 08:37 PM
  2. [SOLVED] re-numbering a list of numbers based on another list of numbers to get a sequential order
    By ryan.wherry in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 11-10-2014, 03:27 PM
  3. Connecting Text from a List to Numbers in a Formula
    By GMan17819 in forum Excel General
    Replies: 1
    Last Post: 06-14-2012, 09:54 PM
  4. Formula question for a list of numbers
    By rkburle in forum Excel General
    Replies: 7
    Last Post: 02-23-2012, 11:36 AM
  5. If formula to match a list of numbers to another list
    By Robotacha2010 in forum Excel General
    Replies: 5
    Last Post: 01-19-2011, 11:26 AM
  6. formula to list numbers within a range
    By alltrade in forum Excel General
    Replies: 2
    Last Post: 08-15-2010, 03:50 AM
  7. find a sum from a list of numbers:need a formula t ofigure out
    By Keven in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-21-2005, 04:05 PM

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