+ Reply to Thread
Results 1 to 9 of 9

Formula returning the number of a cell that contains a number and symbol

  1. #1
    Registered User
    Join Date
    08-07-2012
    Location
    Minnesota
    MS-Off Ver
    Excel 2007
    Posts
    4

    Formula returning the number of a cell that contains a number and symbol

    I have two related formula questions:

    First, is there a formula that will return the number of a cell that contains a number and a symbol?
    For instance, I have many cells that contain something like "<100" and "<1.0."
    I want a formula that will return just the number in the cell, 100 and 1.0 so I don't have to go through and delete all the "<."

    Second, is there a formula that will return HALF of the number of a cell that contains a number and a symbol?
    For instance, I have the cells again that contain "<100" and "<1.0."
    I want a formula that will return HALF of the number in the cell and delete the "<" returning 50 and 0.5.

    Could you help?

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

    Re: Formula returning the number of a cell that contains a number and symbol

    This will separate numbers from any alphanumeric/special text characters

    =LOOKUP(99^99,--("0"&MID($A2,MIN(SEARCH({0,1,2,3,4,5,6,7,8,9},$A2&1234567890)),ROW($1:$10000))))

    If you need top halve that..simply use
    =LOOKUP(99^99,--("0"&MID($A2,MIN(SEARCH({0,1,2,3,4,5,6,7,8,9},$A2&1234567890)),ROW($1:$10000))))/2
    Life's a spreadsheet, Excel!
    Say thanks, Click *

  3. #3
    Forum Contributor CheshireCat's Avatar
    Join Date
    10-11-2011
    Location
    Victoria, Canada
    MS-Off Ver
    Excel 2003 & 2010
    Posts
    258

    Re: Formula returning the number of a cell that contains a number and symbol

    Please note - The formulas suggested will remove decimal points. The results for your example would be 100 and 10.
    Docendo discimus.

  4. #4
    Registered User
    Join Date
    08-07-2012
    Location
    Minnesota
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Formula returning the number of a cell that contains a number and symbol

    That formula did not quite give the result I am looking for. I attached a sheet to try to further explain what I need.
    Attached Files Attached Files

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

    Re: Formula returning the number of a cell that contains a number and symbol

    Remove the absolute references ($ sign) to Column C..

    In M6 use
    =LOOKUP(99^99,--("0"&MID(C6,MIN(SEARCH({0,1,2,3,4,5,6,7,8,9},C6&1234567890)),ROW($1:$10000))))

    drag across and below

    @Cheshire - The formula will give numbers with decimal places too!

  6. #6
    Registered User
    Join Date
    08-07-2012
    Location
    Minnesota
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Formula returning the number of a cell that contains a number and symbol

    Great!
    Now how would the second formula be written? I want to divide in half ONLY the numbers in the cells that contain "<."
    In other words, only the cells that contain "<" will be divided by 2 and the "<" will be deleted.
    Thank you thank you

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

    Re: Formula returning the number of a cell that contains a number and symbol

    Try this..

    =IF(ISNUMBER(C6),C6,LOOKUP(99^99,--("0"&MID(C6,MIN(SEARCH({0,1,2,3,4,5,6,7,8,9},C6&1234567890)),ROW(1:10000))))/2)

  8. #8
    Registered User
    Join Date
    08-07-2012
    Location
    Minnesota
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Formula returning the number of a cell that contains a number and symbol

    Ahhh Thanks so much, I have spent so much time trying to figure this out!!

  9. #9
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Formula returning the number of a cell that contains a number and symbol

    @ thesis

    Based on your last post it seems that you are satisfied with the solution(s) you've received but you haven't marked your thread as SOLVED. I'll do that for you now but please keep in mind for your future threads that Rule #9 requires you to do that yourself. If your problem has not been solved you can use Thread Tools (located above your first post) and choose "Mark this thread as unsolved".
    Thanks.

    Also, as a new member of the forum, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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