+ Reply to Thread
Results 1 to 3 of 3

VBA for Excel: automated correction of wrong decimal separator

  1. #1
    Registered User
    Join Date
    09-27-2017
    Location
    Italy
    MS-Off Ver
    2010
    Posts
    2

    VBA for Excel: automated correction of wrong decimal separator

    Hello all,

    1st, let me thank you for the great job you are doing with this forum: I use it a lot to grab examples as I am quite newbie in VBA programming.

    I'd have a request for a sample code to be implemented in a wider spreadsheet.

    I copy and paste a set of data from a webpage to an Excel file.

    The data imported as numbers have some decimal separator which from time to time is not the same of the system where I import the data.

    I would like to create a macro which:

    1 - Detects the decimal separator (comma or full stop) actually used by Excel: the system must work in different versions which can have different separators
    2 - Replaces the commas in the whole spreadsheet with the correct decimal separator
    3 - Replaces the full stops in the whole spreadsheet with the correct decimal separator
    (I don't mind if the action is redundant or not efficient, as I do not operate on a too wide set of data)
    4 - Formats all the columns from D to G, from the second row to the end of the spreadsheet, as numbers

    So that I can later on process the data as numbers.

    I can easily do it manually, but just because I know which is the right decimal separator for my Excel; I need this operation to be automated in order to work on an Excel file of any other person.

    Thank you all again,

    Marco

  2. #2
    Forum Expert macropod's Avatar
    Join Date
    12-22-2011
    Location
    Canberra, Australia
    MS-Off Ver
    Word, Excel & Powerpoint 2003 & 2010
    Posts
    3,726

    Re: VBA for Excel: automated correction of wrong decimal separator

    Cross-posted at: http://www.vbaexpress.com/forum/show...imal-separator

    Please read Excel Forum's Cross-Posting policy in rule 8: http://www.excelforum.com/forum-rule...rum-rules.html
    Cheers,
    Paul Edstein
    [Fmr MS MVP - Word]

  3. #3
    Registered User
    Join Date
    09-27-2017
    Location
    Italy
    MS-Off Ver
    2010
    Posts
    2

    Re: VBA for Excel: automated correction of wrong decimal separator

    TY Paul, read the thread: won't happen again.
    Marco
    Last edited by mdaneri; 09-27-2017 at 03:39 AM.

+ 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. Decimal separator in charts
    By AivarsK in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 04-21-2016, 11:51 AM
  2. [SOLVED] decimal separator not functioning
    By dedamirkov in forum Excel General
    Replies: 2
    Last Post: 06-21-2012, 10:38 PM
  3. Excel International Decimal Separator.
    By wagnerlip in forum Excel General
    Replies: 7
    Last Post: 01-24-2012, 01:40 PM
  4. Getting decimal separator
    By Helge in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-01-2011, 08:23 AM
  5. Mixup between thousand separator and decimal point in Eurpeean Excel.
    By Jiser001 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 11-02-2009, 05:11 AM
  6. IE8.0 & EXCEL Decimal Separator Issue.
    By littlelittle in forum Excel General
    Replies: 0
    Last Post: 08-07-2009, 12:41 PM
  7. [SOLVED] How to change decimal separator . to ,
    By MG in forum Excel General
    Replies: 2
    Last Post: 03-03-2006, 08:45 AM

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