Results 1 to 3 of 3

Conversion of mixed text/currency value to strict "integer.decimal" value

Threaded View

  1. #1
    Registered User
    Join Date
    10-09-2008
    Location
    Kansas City, MO US
    Posts
    7

    Unhappy Conversion of mixed text/currency value to strict "integer.decimal" value

    I have searched several times on this topic and found several similar situations but none that preserve integer and decimal values together. I have an HTML database that we run regular excel exports from. They export to a .xls file but in an html format, which I can easily fix. Some of the formatting is not correct as exported. I've got most of it figured out but there is one column that I'm having a great deal of trouble getting to work correctly. I'm fairly new to VBA commands in general but not a foreigner to scripting and language use.

    This column is a dollar amount but it is not always entered strictly as a decimal value. Sometimes there are characters or comments thrown in with it. The easy option is to change the field's parameters from text to numeric value only; unfortunately not an option since the field type is set once it's made. I would have to create a new field with the same title and figure out how to transfer only the number values from all previous entries to the new field. It is (should be) simpler to just write a VBA to handle removal of everything except the numeric value of the currency, then convert formatting to currency format. The currency formatting is easy, I've got that part done. Getting the extra characters out of the mix is proving to be much more complex.

    Here are some examples:
    FIELD VALUE_____________DESIRED OUTPUT VALUE
    __$49.76 (plus tax)_________$49.76
    __253.99USD______________$253.99
    __~50EUR (+s/h)___________$50.00

    I'm not concerned with losing the EUR portion as that will also be handled elsewhere in the record entry and should never make it to this field as EUR anyway, but it occasionally happens. As long as the numbers can be extracted, including the decimal numbers where required, is good enough for my application. Every function I've tried thus far either returns a #VALUE error because of the text or does not produce the output I'm seeking.

    I've attached a copy of the file for review. I've already converted it to excel format from the HTML export. The column in question is column I, "RFP Amount". Column J has some experimentation leftover that I was playing around with.
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Month Conversion using "Text" command function
    By Karnik in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 07-31-2016, 05:47 AM
  2. [SOLVED] Can't get a userform text box to display a number format, ie "Currency"
    By Gwg1955 in forum Excel Programming / VBA / Macros
    Replies: 21
    Last Post: 11-08-2015, 08:40 PM
  3. Mixed text/number cell and "European" comma/dot
    By d_abbatelli in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-14-2014, 03:37 AM
  4. Replies: 2
    Last Post: 08-17-2012, 05:41 PM
  5. Decimal Conversion into integer
    By maanrehman2001 in forum Excel General
    Replies: 2
    Last Post: 04-02-2012, 06:54 AM
  6. Customising the TEXT(Value,"Format") Function for Indian Currency
    By e4excel in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 03-11-2011, 10:43 AM
  7. [SOLVED] Random Conversion of alpha/numeric text with letter "e" to exponen
    By CrystalJim in forum Excel General
    Replies: 8
    Last Post: 08-15-2006, 02:15 PM

Tags for this Thread

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