+ Reply to Thread
Results 1 to 12 of 12

Excel Quirky issue???? with french decimal separators

  1. #1
    Forum Contributor
    Join Date
    07-16-2009
    Location
    Montreal, Canada
    MS-Off Ver
    Excel 2013
    Posts
    114

    Excel Quirky issue???? with french decimal separators

    Hello, I'm having a wierd issue with vba and it's driving me nuts. I have a macro that produces pricelists and outputs them to pdf, the macro produces bot english and french pdf versions so when it comes to french I have to convert the decimal separator to a comma. problem is the sheet does not take the formatting, the column widths don't get adjusted and the numbers do not get 2 decimal places. But when i put a break point to see where the problem is everything works fine and it takes all the formatting as it should. I have tried turning screen updating back on for this section of code, I have tried making the sheet recalculate, none of it seems to work. please help.

    Chris


    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Last edited by Code Flunkie; 07-20-2015 at 09:05 AM.

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,461

    Re: Excel Quirky issue???? with french decimal separators

    Wherever you have Cells or Range, you need a dot/full stop/point in front of it to link it to the With SheetNum, that is .Cells and .Range


    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Forum Expert GeneralDisarray's Avatar
    Join Date
    09-15-2011
    Location
    Pittsburgh, PA, USA
    MS-Off Ver
    Windows Excel 2016
    Posts
    1,416

    Re: Excel Quirky issue???? with french decimal separators

    retracted... good eye TMS
    Remember, saying thanks only takes a second or two. Click the star icon(*) below the post you liked, to give some Rep if you think an answer deserves it.

    Please,mark your thread [SOLVED] if you received your answer.

  4. #4
    Forum Contributor
    Join Date
    07-16-2009
    Location
    Montreal, Canada
    MS-Off Ver
    Excel 2013
    Posts
    114

    Re: Excel Quirky issue???? with french decimal separators

    I don't follow. The code works flawlessly when it produces the english pdf, it also works flawlessly when i put a break and go through the code line by line with F8 to produce the french pdf, it just doesn't work when the code runs on it's own for the french pdf with the "," as a separator. so where do i put these dots?

  5. #5
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,461

    Re: Excel Quirky issue???? with french decimal separators

    so where do i put these dots?
    I've told you. Wherever you have Cells or Range. The difference could be the sheet that is selected when the code is run. I take it you haven't tried the suggestion?

  6. #6
    Forum Contributor
    Join Date
    07-16-2009
    Location
    Montreal, Canada
    MS-Off Ver
    Excel 2013
    Posts
    114

    Re: Excel Quirky issue???? with french decimal separators

    ok, I just tried it out and it still doesn't work.

  7. #7
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,461

    Re: Excel Quirky issue???? with french decimal separators

    Suggest you post a sample workbook.

  8. #8
    Forum Contributor
    Join Date
    07-16-2009
    Location
    Montreal, Canada
    MS-Off Ver
    Excel 2013
    Posts
    114

    Re: Excel Quirky issue???? with french decimal separators

    I think I figure it out, it seems that excel doesn't like the range written as .Range("B:B,C:C,F:F,J:J,K:K,N:N") with gaps between the ranges, but only when the decimal separator is a comma. is there a better way to write the range so it doesn't ignore it?


    Please Login or Register  to view this content.

  9. #9
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,461

    Re: Excel Quirky issue???? with french decimal separators

    Maybe this approach:

    Please Login or Register  to view this content.

    Regards, TMS

  10. #10
    Forum Contributor
    Join Date
    07-16-2009
    Location
    Montreal, Canada
    MS-Off Ver
    Excel 2013
    Posts
    114

    Re: Excel Quirky issue???? with french decimal separators

    is there a way to use union without using select?

  11. #11
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,461

    Re: Excel Quirky issue???? with french decimal separators

    Of course, that was just an example to demonstrate the use of Union.

  12. #12
    Forum Contributor
    Join Date
    07-16-2009
    Location
    Montreal, Canada
    MS-Off Ver
    Excel 2013
    Posts
    114

    Re: Excel Quirky issue???? with french decimal separators

    Everything is working as intended on my macro now and I learned something new, thanks for everything.

  13. #13
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,461

    Re: Excel Quirky issue???? with french decimal separators

    You're welcome. Thanks for the rep.

+ 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. French format issue for Excel graph not divided by 1000
    By myowntest in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 08-16-2013, 01:52 AM
  2. [SOLVED] ChangeFormat of column from English decimal system with a dot to French System with a ,
    By rajiv1988 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-27-2013, 04:31 AM
  3. Macro to convert decimal separators from US to EU format when loading a CSV file?
    By Knut Grossmann in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-18-2013, 04:01 PM
  4. Problem with decimal and thousand separators
    By inqmobile in forum Excel General
    Replies: 7
    Last Post: 08-27-2012, 12:10 PM
  5. CSV to Excel European Decimal Issue
    By jbl25 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-05-2012, 11:20 AM
  6. French Excel Macro issue related to cell formats
    By nozerf in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 10-23-2011, 09:05 AM
  7. IE8.0 & EXCEL Decimal Separator Issue.
    By littlelittle in forum Excel General
    Replies: 0
    Last Post: 08-07-2009, 12:41 PM
  8. [SOLVED] Excel 97/XP Issue with numbers and French machines
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-24-2005, 12:05 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