+ Reply to Thread
Results 1 to 5 of 5

Problem with language

  1. #1
    Registered User
    Join Date
    03-08-2018
    Location
    SP, Brasil
    MS-Off Ver
    2016
    Posts
    3

    Question Problem with language

    hello

    I am trying to replace months with their respective number using
    Please Login or Register  to view this content.
    (columm A contains the month name)

    The problem is: if I use it in english like january, february and so on, it works fine. However, my excel, windows system and data is in Portuguese: so I have Janeiro, Fevereiro and etc.
    If the month is in portuguese, it returns a #value error.
    I find it weird because the code works fine in my coworker's excel who sits at my side while using portuguese months name. Anybody know how to fix this issue?

    Best regards.

    (I put this question here because I think it's not function related. If it should be in the function related forum, I'm sorry)

  2. #2
    Forum Expert ben_hensel's Avatar
    Join Date
    01-26-2012
    Location
    Northeast USA
    MS-Off Ver
    Office 365
    Posts
    2,043

    Re: Problem with language

    Honestly rather than mucking about with language settings, I'd just brute-force it with a lookup function:

    Please Login or Register  to view this content.
    Or maybe just match the first three letters:
    Please Login or Register  to view this content.
    It's pretty brute force, but I feel like it's a more transparent approach that will be more independent of language settings, and also more apparent to debug if something goes wrong in the future.

    You could even get really slick and nest with IFERROR, or build a SUMPRODUCT, that will assess for both English and Portuguese.
    Click the [* Add Reputation] Button to thank people for help!
    Post Attachment: Click [Go Advanced] under the reply box; then click [Manage Attachments] to launch the attachments dialogue.
    Mark Thread Solved: Go to the top of the first post; Select [Thread Tools] dropdown; Pick the [Mark thread as Solved] option.

  3. #3
    Registered User
    Join Date
    03-08-2018
    Location
    SP, Brasil
    MS-Off Ver
    2016
    Posts
    3

    Re: Problem with language

    Quote Originally Posted by ben_hensel View Post
    Honestly rather than mucking about with language settings, I'd just brute-force it with a lookup function:

    Please Login or Register  to view this content.
    Or maybe just match the first three letters:
    Please Login or Register  to view this content.
    It's pretty brute force, but I feel like it's a more transparent approach that will be more independent of language settings, and also more apparent to debug if something goes wrong in the future.

    You could even get really slick and nest with IFERROR, or build a SUMPRODUCT, that will assess for both English and Portuguese.
    I hate brute forcing stuff =P but that seems a fast solution to use for now. Thank you sir. If I ever find out somehow the solution I will post here

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,917

    Re: Problem with language

    Do you have the PC regional settings set up for your location? (compare with the other PC)
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  5. #5
    Registered User
    Join Date
    03-08-2018
    Location
    SP, Brasil
    MS-Off Ver
    2016
    Posts
    3

    Re: Problem with language

    Quote Originally Posted by FDibbins View Post
    Do you have the PC regional settings set up for your location? (compare with the other PC)
    Yep, both are set to Brasil

+ 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. [SOLVED] SQL Query language problem
    By Phixer in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-25-2014, 02:20 PM
  2. Query language problem
    By Phixer in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-02-2014, 08:35 AM
  3. Real time text translation to match the language selectedin language vailidation
    By Rocky2013 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-01-2013, 09:23 PM
  4. Language problem
    By magnum206 in forum Excel General
    Replies: 5
    Last Post: 06-04-2011, 08:11 AM
  5. Language problem
    By Molecheese in forum Excel General
    Replies: 1
    Last Post: 05-11-2009, 04:08 PM
  6. language translation problem?
    By carsto in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-26-2008, 02:50 PM
  7. Problem with Language
    By Robert57 in forum Excel General
    Replies: 10
    Last Post: 12-23-2005, 06:25 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