+ Reply to Thread
Results 1 to 9 of 9

Separating numbers and text and funky rounding

  1. #1
    Registered User
    Join Date
    03-05-2014
    Location
    Florida
    MS-Off Ver
    Excel 2007
    Posts
    7

    Separating numbers and text and funky rounding

    Morning all,

    I've been racking my brain with these for a while and I am getting frustrated. I have a column of numbers, some with letters, and need to split the value based on the letter. Example:

    A1
    4
    4 U
    4 I

    If the cell has just a number, do nothing. If it had a U, remove the U and divide the number by 2. if it has an I, leave the cell blank. Now I've tried every combination of IF, FIND, LEFT, ISNUMBER I can think of and I am only able to do 2 of the 3 test. I need to do all 3

    And if there is a function to do scientific rounding with significant figures, I need a script to do that as well. I seem to remember Excel had a function for that. IE: rounding to even numbers. I dont know how to explain scientific rounding because it confuses me still to this day

    Thank you in advance

    -D
    Last edited by waterexcels; 03-05-2014 at 08:20 AM.

  2. #2
    Forum Expert
    Join Date
    02-19-2013
    Location
    India
    MS-Off Ver
    07/16
    Posts
    2,386

    Re: Separating numbers and text and funky rounding

    can you upload a sample book with desired results.

    assuming your data is in A1 to A10
    in b1 try this =IF(ISNUMBER(A1),A1,IFERROR(IF(SEARCH("U",A1)>=1,ROUND(SUBSTITUTE(A1,"U","")/2,0),""),""))
    Last edited by hemesh; 03-05-2014 at 08:43 AM.
    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    WANT TO SAY THANKS, HIT ADD REPUTATION (*) AT THE BOTTOM LEFT CORNER OF THE POST

    More we learn about excel, more it shows us, how less we know about it.

    for chemistry
    https://www.youtube.com/c/chemistrybyshivaansh

  3. #3
    Registered User
    Join Date
    03-05-2014
    Location
    Florida
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Separating numbers and text and funky rounding

    Hey thanks for the reply. i don't think I can upload this data.

    I also should have mention the 2 functions need to be separated. They are for 2 different computations

  4. #4
    Forum Expert
    Join Date
    02-19-2013
    Location
    India
    MS-Off Ver
    07/16
    Posts
    2,386

    Re: Separating numbers and text and funky rounding

    you can upload atleast 10-15 rows of look alike data with expected results to work with !

  5. #5
    Valued Forum Contributor AZ-XL's Avatar
    Join Date
    03-22-2013
    Location
    Azerbaijan, Baku
    MS-Off Ver
    Excel 2007
    Posts
    603

    Re: Separating numbers and text and funky rounding

    Hi
    =IF(ISNUMBER(A1),A1,
    IF(ISERROR(SEARCH("u",A1)),"",ROUND(--SUBSTITUTE(A1,"U","")/2,0)))
    Appreciate the help? CLICK *

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,719

    Re: Separating numbers and text and funky rounding

    Quote Originally Posted by waterexcels View Post
    I also should have mention the 2 functions need to be separated. They are for 2 different computations
    You mentioned three functions in your opening post, so which two do you need to be able to do and which one have you already worked out (and how are you doing it)? What do you mean by 'scientific' rounding and how does it differ from mathematical rounding (i.e. .5 or more rounds up, below that rounds down)?
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  7. #7
    Registered User
    Join Date
    03-05-2014
    Location
    Florida
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Separating numbers and text and funky rounding

    Quote Originally Posted by AliGW View Post
    You mentioned three functions in your opening post, so which two do you need to be able to do and which one have you already worked out (and how are you doing it)? What do you mean by 'scientific' rounding and how does it differ from mathematical rounding (i.e. .5 or more rounds up, below that rounds down)?
    The rounding function is separate from the function that deals with the the column A1

    Scientific rounding is stupid. I cant really explain it in an easy way without confusing both of us. But I do think there is a built in function in Excel, I just cant remember it

  8. #8
    Registered User
    Join Date
    03-05-2014
    Location
    Florida
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Separating numbers and text and funky rounding

    Here is how scientific rounding works:

    If the last digit after the decimal is a 5, you want to round the digit before it to the closest even number. If the last digit is any other number, you round as normal, to sig figs.

    Assuming 2 sig figs:

    2.35 would be 2.4
    2.25 would be 2.2
    2.45 would be 2.4
    2.34 would be 2.3
    2.37 would be 2.4
    0.05 would be 0.0
    0.155 would be 0.2

    Confused?

  9. #9
    Registered User
    Join Date
    03-05-2014
    Location
    Florida
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Separating numbers and text and funky rounding

    Quote Originally Posted by AZ-XL View Post
    Hi
    =IF(ISNUMBER(A1),A1,
    IF(ISERROR(SEARCH("u",A1)),"",ROUND(--SUBSTITUTE(A1,"U","")/2,0)))


    Hey AZ-XL, that worked! I removed the ROUND function, and it did exactly what i needed. Thank you!

    I appreciate everyone's help. I will now try to work on the rounding function. I have an idea...

+ 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. Separating numbers from text
    By njmania25 in forum Excel General
    Replies: 4
    Last Post: 09-10-2011, 01:25 PM
  2. Excel 2007 : Need help separating numbers/text
    By dancediva in forum Excel General
    Replies: 6
    Last Post: 04-27-2011, 06:14 PM
  3. Separating text from numbers
    By shadow91 in forum Excel General
    Replies: 4
    Last Post: 03-19-2010, 10:10 AM
  4. separating numbers and text in string
    By echoesaretimeless in forum Excel General
    Replies: 3
    Last Post: 12-08-2009, 05:57 AM
  5. Separating numbers from a text
    By Climaxgp in forum Access Programming / VBA / Macros
    Replies: 1
    Last Post: 06-29-2009, 04:54 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