+ Reply to Thread
Results 1 to 6 of 6

Left of decimal with numerical and text values

  1. #1
    Registered User
    Join Date
    02-10-2012
    Location
    Denver
    MS-Off Ver
    Excel 365
    Posts
    21

    Left of decimal with numerical and text values

    I have a conudrum and I can't seem to work through and I suspect I'll have a /DOH moment once one of you fine people answer.

    I have a string I need to get only a piece of data from. The string is such (2500M65662.RHD) to which I only need the 65662 and I need it in numercial formation.

    Thanks in advance.

    Tim

  2. #2
    Registered User
    Join Date
    02-10-2012
    Location
    Denver
    MS-Off Ver
    Excel 365
    Posts
    21

    Re: Left of decimal with numerical and text values

    ANd to clarify, I have to do this through several strings where I only need the 5 characters to the left of the decimal.

  3. #3
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Left of decimal with numerical and text values

    Is it always consistently 5 digits before decimal?

    e.g.

    =--MID(A1,FIND(".",A1)-5,5)
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  4. #4
    Registered User
    Join Date
    02-10-2012
    Location
    Denver
    MS-Off Ver
    Excel 365
    Posts
    21

    Re: Left of decimal with numerical and text values

    Yes, or at least it should be. THanks, I'll give it a go and report back.

  5. #5
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Left of decimal with numerical and text values

    Is the numerical string always 5 digits? Does it always preceed the period? If not, what patterns are there?

    If so,
    =MID(A1,SEARCH(".",A1)-5,5)+0
    Does that work for you?

    Edit: Wow, I'm late for the party! LOL
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  6. #6
    Registered User
    Join Date
    02-10-2012
    Location
    Denver
    MS-Off Ver
    Excel 365
    Posts
    21

    Re: Left of decimal with numerical and text values

    Thanks to each. Worked perfectly! And yes, it was a /DOH moment

+ 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