+ Reply to Thread
Results 1 to 9 of 9

Extracting Data from Numeric+Text and Replacing

  1. #1
    Registered User
    Join Date
    09-19-2013
    Location
    Alabama
    MS-Off Ver
    Excel 2010
    Posts
    14

    Extracting Data from Numeric+Text and Replacing

    Hello,

    I need a little help with my formula.

    I have a labor category that is numeric and text. I want to take the numeric portion and change it.

    If the numbers are 1.1 to 1.9, then I want to create another number in a column as 101 to 109.
    If the numbers are 1.10 to 1.19, then I want the number to be 110 to 119.

    Here is the formula I entered:

    =IF(LEFT(A12,4)>=0,LEFT(A12,1)&MID(A12,3,2),LEFT(A12,1)&0&MID(A12,3,1))

    It is not working because it see's the space as 0. See attached spreadsheet.
    Attached Files Attached Files

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

    Re: Extracting Data from Numeric+Text and Replacing

    You havent said whats meant to happen if none of those values (1.1-1.19)
    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 Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Extracting Data from Numeric+Text and Replacing

    Try

    =LEFT(A3,1)&TEXT(MID(A3,3,2),"00")

  4. #4
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,649

    Re: Extracting Data from Numeric+Text and Replacing

    Try this to see if you get the desired output....

    In B3
    Please Login or Register  to view this content.
    and then copy down.
    Regards
    sktneer


    Treat people the way you want to be treated. Talk to people the way you want to be talked to.
    Respect is earned NOT given.

  5. #5
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,649

    Re: Extracting Data from Numeric+Text and Replacing

    @Jonmo1

    Very good logic. Neat & Short.

  6. #6
    Registered User
    Join Date
    09-19-2013
    Location
    Alabama
    MS-Off Ver
    Excel 2010
    Posts
    14

    Re: Extracting Data from Numeric+Text and Replacing

    Does not work

    I tried both "Jonmo1" and "sktneer".

    Jonmo1 - did you mean to enter like this?

    =IF(TEXT(MID(A3,4,2),"00"),LEFT(A3,1)&0&MID(A3,3,1),LEFT(A3,1)&MID(A3,3,2))

    This gives me "#Value!"

    Sktneer

    Your formula you typed contains an error and highlights the first "." in the formula.
    I'm not that good with Excel. I haven't used substitute and find too much.

    Thanks.
    Last edited by kunjanee; 01-29-2015 at 12:42 PM.

  7. #7
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Extracting Data from Numeric+Text and Replacing

    Works for me.

    Can you elaborate on "Does not work" ?

    Do you get an error? What error?
    Do you get the wrong result? What result DO you get, and what result did you expect?

    In this example book, which cell(s) did not produce your desired result?
    EFKunjanee.xlsx

  8. #8
    Registered User
    Join Date
    09-19-2013
    Location
    Alabama
    MS-Off Ver
    Excel 2010
    Posts
    14

    Re: Extracting Data from Numeric+Text and Replacing

    Ok...sorry. I must have entered it wrong the first time I tried.

    "Jonmo1" - Your formula works for me. =LEFT(A3,1)&TEXT(MID(A3,3,2),"00")

    Thanks for all your help!
    Last edited by kunjanee; 01-29-2015 at 12:13 PM.

  9. #9
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Extracting Data from Numeric+Text and Replacing

    You're welcome.

+ 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. [SOLVED] Extracting only numeric data from combined numeric & non-numeric data
    By paradise2sr in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 11-20-2013, 11:51 AM
  2. function for extracting numeric data from text file
    By gapink in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-10-2012, 03:20 AM
  3. [SOLVED] Extracting Non-Uniform Numeric Values From Strings Of Text
    By ExcelHostile in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 08-23-2012, 08:46 PM
  4. Replies: 7
    Last Post: 04-20-2006, 07:30 AM
  5. [SOLVED] Extracting Numeric Data from a Delimited Text String
    By [email protected] in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 02-10-2006, 06:35 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