+ Reply to Thread
Results 1 to 15 of 15

Extract numeric value from a cell where Text and Numeric combined in a cell

  1. #1
    Registered User
    Join Date
    01-06-2014
    Location
    Hyderabad
    MS-Off Ver
    Excel 2010
    Posts
    29

    Extract numeric value from a cell where Text and Numeric combined in a cell

    Dear All,

    Can someone please help with me with the below Macro.

    Currently, I am able to extract a Text, but I want to extract Numeric value from the below Code


    Please Login or Register  to view this content.
    Please help asap

    Thank in advance

    Chandru
    Last edited by Chandrahaas; 10-07-2014 at 07:29 AM.

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    Re: Extract numeric value from a cell where Text and Numeric combined in a cell

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here



    (This thread should receive no further responses until this moderation request is fulfilled, as per Forum Rule 7)

  3. #3
    Registered User
    Join Date
    01-06-2014
    Location
    Hyderabad
    MS-Off Ver
    Excel 2010
    Posts
    29

    Re: Extract numeric value from a cell where Text and Numeric combined in a cell

    It would be very helpful

  4. #4
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Extract numeric value from a cell where Text and Numeric combined in a cell

    Try this UDF from Ozgrid.

    Please Login or Register  to view this content.
    Your code modified:

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    01-06-2014
    Location
    Hyderabad
    MS-Off Ver
    Excel 2010
    Posts
    29

    Re: Extract numeric value from a cell where Text and Numeric combined in a cell

    The Code is not working and throwing an error message.

    Here is the example and extecped output and also attached a sample file for your reference.

    Current Value Expected Output
    Amount currency code
    203,969.00 EUR 203,969.00 EUR

    Kind regards,
    Chandru
    Attached Files Attached Files
    Last edited by Chandrahaas; 10-07-2014 at 08:19 AM.

  6. #6
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Extract numeric value from a cell where Text and Numeric combined in a cell

    Quote Originally Posted by Chandrahaas View Post
    The Code is not working and throwing an error message.

    Here is the example and extecped output and also attached a sample file for your reference.

    Current Value Expected Output
    Amount currency code
    203,969.00 EUR 203,969.00 EUR

    Kind regards,
    Chandru
    Can't tell what you want from your post? Your output appears to be the same as your input. Does this help?

    Please Login or Register  to view this content.

  7. #7
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Extract numeric value from a cell where Text and Numeric combined in a cell

    Or do you want a combined code?

    Please Login or Register  to view this content.

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

    Re: Extract numeric value from a cell where Text and Numeric combined in a cell

    @JOHN H. DAVIS
    I think OP needs to show the desired output as well.
    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.

  9. #9
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Extract numeric value from a cell where Text and Numeric combined in a cell

    @sktneer - I think post 7 is what she/he is after. When I replied with quotes Post 6 kinda lined up. Let's see.

  10. #10
    Registered User
    Join Date
    01-06-2014
    Location
    Hyderabad
    MS-Off Ver
    Excel 2010
    Posts
    29

    Re: Extract numeric value from a cell where Text and Numeric combined in a cell

    Hi All,

    still the updated code is not working. Please help

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

    Re: Extract numeric value from a cell where Text and Numeric combined in a cell

    Quote Originally Posted by Chandrahaas View Post
    Hi All,

    still the updated code is not working. Please help
    I can see that you are interested only in telling that the code is not working. But probably you don't think that it is necessary to read all the replies above to know what is going on here and what the members expect from you. Read the post# 6, 7, 8 and 9.

    If you get an error during the code, you need to debug it to know which line of code is highlighted and you should mention that line in your reply so that the member who has provided the code would be able to suggest you the correction in the code.

    Moreover its good that you uploaded the sample workbook but you didn't show what desired output you are expecting.
    So please upload a sample workbook with the raw data and the expected output.

  12. #12
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Extract numeric value from a cell where Text and Numeric combined in a cell

    Try:

    Please Login or Register  to view this content.
    Didn't know you had a custom format.

  13. #13
    Registered User
    Join Date
    01-06-2014
    Location
    Hyderabad
    MS-Off Ver
    Excel 2010
    Posts
    29

    Re: Extract numeric value from a cell where Text and Numeric combined in a cell

    Dear John,

    Thank you Very much for your help. It worked perfectly! You're rocking

    Kind Regards,
    Chandru

  14. #14
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Extract numeric value from a cell where Text and Numeric combined in a cell

    You're welcome. Glad to help out and thanks for the feedback.

  15. #15
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: Extract numeric value from a cell where Text and Numeric combined in a cell

    A really simple UDF to extract the value of the front of a string is
    Please Login or Register  to view this content.
    =MyVal(SUBSTITUTE("203,969.00 EUR", ",", "")) returns 203969
    _
    ...How to Cross-post politely...
    ..Wrap code by selecting the code and clicking the # or read this. Thank you.

+ 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. How to extract a Numeric value from a cell
    By Chandrahaas in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-07-2014, 07:11 AM
  2. Replies: 7
    Last Post: 02-25-2014, 02:00 AM
  3. [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
  4. Replies: 4
    Last Post: 09-16-2010, 12:22 AM
  5. only extract numeric value from alpha numeric cell
    By Fam via OfficeKB.com in forum Excel General
    Replies: 5
    Last Post: 04-26-2006, 01:55 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