+ 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
    Rocester, New York, USA
    MS-Off Ver
    Excel 2007:10
    Posts
    1,819

    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 2000/3/7/10/13/16
    Posts
    45,696

    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

    STOP PRESS: Forum Rules Updated September 2018! Please read them here.

  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)

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