+ Reply to Thread
Results 1 to 4 of 4

Automation of Text into Number

  1. #1
    Registered User
    Join Date
    06-11-2008
    Location
    Hyderabad
    Posts
    54

    Automation of Text into Number

    I have Sheet which contains Age in Text for Ex : 74 Years but i need to Convert in Number 74 so that i can calculate the total age for my summary updation. And Additional to this there are Many spaces , commas ,dot and some time the age can be displayed as 24 Months and which should be as 2 years and instead fo years it will be as year . so here please can any help with the attached excel sheet which convert all the ages and replace the updated age in the same column only.

    For Ex:

    Col A After applying the VB the Output needed is ColA
    74 Years 74
    20 Year 20
    2 Days 1
    24 Months 2

    Please any help me out the change the text format of age in number format age.

    Excel Sheet attached.
    Attached Files Attached Files
    Last edited by VBA Noob; 01-29-2009 at 03:41 AM.
    Thank you,

    Surya

  2. #2
    Registered User
    Join Date
    01-16-2009
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2007
    Posts
    16

    Re: Automation of Text into Number

    Here is a function that may help you. Follow these instructions
    • Go into the Visual Basic Editor (Alt + F11)
    • Insert a module from the Insert Menu
    • Paste in this code (see below)
    • In cell B2 type =GetNumber(A2).
    • Copy your new formula down to other cells using the normal methods (Autofill)
    • Copy and paste the results as values over the existing data

    Please Login or Register  to view this content.
    Craig Holmes
    Microsoft Office Specialist Master Instructor
    Excel Training Courses Sydney | Microsoft Office Excel VBA Courses

  3. #3
    Registered User
    Join Date
    06-11-2008
    Location
    Hyderabad
    Posts
    54

    Re: Automation of Text into Number

    The Formula nor the code are working.

  4. #4
    Forum Contributor
    Join Date
    02-27-2008
    Posts
    764

    Re: Automation of Text into Number

    Hi
    try the macro in the attached excel file
    Ravi
    Attached Files Attached Files

+ 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