+ Reply to Thread
Results 1 to 5 of 5

Autofilter does not work properly - Issue with Comma/Dot decimal separator

  1. #1
    Registered User
    Join Date
    07-05-2018
    Location
    Bonn
    MS-Off Ver
    MS Office 2010
    Posts
    6

    Autofilter does not work properly - Issue with Comma/Dot decimal separator

    Hi all,

    I am writing here because I am trying to develop a VBA code in order to execute an autofilter based on the criteria specified by the user.

    The user must specify in cells Cells(2, 18) and Cells(3, 18) the criteria.

    My issue is that it works perfectly in the computer I develop, but it does not work in some users' computers.

    One of the criteria is a percentage value. After defining the variable, 80% becomes 0,8 in some users' laptops, but when filtering the data with "0,8", it does not work. But with 0.8, it works perfectly.

    A solution that may be suggested is to change the users' settings in Excel - that is not feasible, since I would have to deal with hundreds of users and this is only one report. So it is too much effort for too little.

    Another solution that I thought is replacing the comma by a dot not in the User specification, but in the way how the Excel/VBA reads the criteria entered by the user. That means, if the user inserts 80%, Excel will read 0,8, but it will replace comma by a dot. I tried to use the formula replace in Excel, but it did not work. Is there a way of replacing the comma by a do within VBA?


    Please Login or Register  to view this content.
    Thanks in advance for any help!

    Regards,
    Lucas

  2. #2
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,623

    Re: Autofilter does not work properly - Issue with Comma/Dot decimal separator

    Have you tried to do a replacement this way:
    Please Login or Register  to view this content.
    ?
    Best Regards,

    Kaper

  3. #3
    Registered User
    Join Date
    07-05-2018
    Location
    Bonn
    MS-Off Ver
    MS Office 2010
    Posts
    6

    Re: Autofilter does not work properly - Issue with Comma/Dot decimal separator

    Never mind! I could figure out a solution for this.

    For some reason I was using the replace function wrongly

  4. #4
    Registered User
    Join Date
    07-05-2018
    Location
    Bonn
    MS-Off Ver
    MS Office 2010
    Posts
    6

    Re: Autofilter does not work properly - Issue with Comma/Dot decimal separator

    Thanks Kaper.

    It was just a stupid mistake I was making

  5. #5
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,623

    Re: Autofilter does not work properly - Issue with Comma/Dot decimal separator

    Glad to hear so (Well, not glad of the mistake :-) - rather that it works now).

    Please remember to mark thread SOLVED using Thread Tools link above first post

+ 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. Comma decimal separator with SQL insert
    By Quackerspaniel in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-10-2016, 01:03 PM
  2. decimal separator and Like operator do not work together well
    By kmeld in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-21-2013, 08:44 AM
  3. Replies: 1
    Last Post: 03-28-2013, 12:44 PM
  4. [SOLVED] Weird decimal separator issue
    By joebanana in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 05-29-2012, 04:05 PM
  5. decimal separator is comma, not period
    By lmmohr in forum Excel General
    Replies: 2
    Last Post: 02-13-2012, 02:32 PM
  6. IE8.0 & EXCEL Decimal Separator Issue.
    By littlelittle in forum Excel General
    Replies: 0
    Last Post: 08-07-2009, 12:41 PM
  7. Decimal point/comma issue
    By Excelerate-nl in forum Excel General
    Replies: 3
    Last Post: 01-12-2006, 05:50 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