+ Reply to Thread
Results 1 to 37 of 37

Change Currency Symbol on Worksheet based on cell value

  1. #1
    Forum Contributor
    Join Date
    06-25-2012
    Location
    Porto, Portugal
    MS-Off Ver
    Excel 2010
    Posts
    201

    Question Change Currency Symbol on Worksheet based on cell value

    How do change the symbol of cells that have format currency in euro to dollar based on cell drop list euro/dollar. Need to say that need something to apply to whole workbook that has about 700 worksheets and that sheets have cells formatted as currency, numbers and percent. So I need something that looks at value of drop list cell, then looks for cells formatted as currency in whole workbook then change symbol from € to dollar our vice versa. Don't know how to do this. The most similar thing I found was to change on a range of specific worksheet. And I need something to the whole workbook and to change only the cells formatted as currency whiteout me telling what range is.

  2. #2
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Re: Change Currency Symbol on Worksheet based on cell value

    You might need something like this

    Please Login or Register  to view this content.
    You might have to play about with the formats until you get exactly what you want. An easy way is to record setting the formats and copying from the recorded code.
    Martin

  3. #3
    Forum Contributor
    Join Date
    06-25-2012
    Location
    Porto, Portugal
    MS-Off Ver
    Excel 2010
    Posts
    201

    Re: Change Currency Symbol on Worksheet based on cell value

    thank you for your help. But i dont know where to put the code. In the worksheet? As a module? Dont really know... Anyway i put i let a file here (http://www.freefilehosting.net/menu) with what i need. I need in the sheet Menu, that when i select EURO it changes all worksheets to Euro sign (only in cells formated as currency) and without telling where cells range is. If i select POUND it changes symbol to pounds... etc.... your code seams to have what i need, just dont know how to make it work...
    Attached Files Attached Files
    Last edited by Taislin; 11-04-2012 at 03:22 PM.

  4. #4
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Re: Change Currency Symbol on Worksheet based on cell value

    The code needs to go in a module.

    The location that you provided seems to want to do more than just provide the file. It would be better if you could attach it (or a cut down version) to a post in the forum.

  5. #5
    Forum Contributor
    Join Date
    06-25-2012
    Location
    Porto, Portugal
    MS-Off Ver
    Excel 2010
    Posts
    201

    Re: Change Currency Symbol on Worksheet based on cell value

    It doesnt do anything the location. Just click download and a confirmation letters and numbers box appear to confirm download. And then it download the file. But if you want i upload it here... just dont really see that option under reply. Can i send it to your email or something?

  6. #6
    Forum Contributor
    Join Date
    06-25-2012
    Location
    Porto, Portugal
    MS-Off Ver
    Excel 2010
    Posts
    201

    Re: Change Currency Symbol on Worksheet based on cell value

    Ahhh... found it lol here it is!
    Attached Files Attached Files

  7. #7
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Re: Change Currency Symbol on Worksheet based on cell value

    To Attach a File:

    1. Click on Go Advanced
    2. In the frame Attach Files you will see the button Manage Attachments
    3. Click the button.
    4. A new window will open titled Manage Attachments - Excel Forum.
    5. Click the Browse... button to locate your file for uploading.
    6. This will open a new window File Upload.
    7. Once you have located the file to upload click the Open button. This window will close.
    8. You are now back in the Manage Attachments - Excel Forum window.
    9. Click the Upload button and wait until the file has uploaded.
    10. Close the window and then click Submit.

  8. #8
    Forum Contributor
    Join Date
    06-25-2012
    Location
    Porto, Portugal
    MS-Off Ver
    Excel 2010
    Posts
    201

    Re: Change Currency Symbol on Worksheet based on cell value

    Quote Originally Posted by mrice View Post
    To Attach a File:

    1. Click on Go Advanced
    2. In the frame Attach Files you will see the button Manage Attachments
    3. Click the button.
    4. A new window will open titled Manage Attachments - Excel Forum.
    5. Click the Browse... button to locate your file for uploading.
    6. This will open a new window File Upload.
    7. Once you have located the file to upload click the Open button. This window will close.
    8. You are now back in the Manage Attachments - Excel Forum window.
    9. Click the Upload button and wait until the file has uploaded.
    10. Close the window and then click Submit.
    Already did... found it after responding to your last post. Check previous replies.Thank you

  9. #9
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Re: Change Currency Symbol on Worksheet based on cell value

    OK - paste the following into the Sheet1 tab in the VBA editor.

    Please Login or Register  to view this content.

  10. #10
    Forum Contributor
    Join Date
    06-25-2012
    Location
    Porto, Portugal
    MS-Off Ver
    Excel 2010
    Posts
    201

    Re: Change Currency Symbol on Worksheet based on cell value

    Quote Originally Posted by mrice View Post
    OK - paste the following into the Sheet1 tab in the VBA editor.

    Please Login or Register  to view this content.
    man you're a genious! it almost worked perfectlly. The problem is that with Pounds i'm getting Euro symbol (like €10,00) insted of £. But i guess its a formatting problem in VBA code. The real problem is that the code is changing every cell formated as number, day and currency! I need that it changes the symbol of ONLY cells formatted as currency. Is that possible? Thank you very much for your quick replies!

  11. #11
    Forum Contributor
    Join Date
    06-25-2012
    Location
    Porto, Portugal
    MS-Off Ver
    Excel 2010
    Posts
    201

    Re: Change Currency Symbol on Worksheet based on cell value

    The POUND thing i just figured it out. Just modiffied the code to: Case Is = "POUND"
    Cell.NumberFormat = "£#,##0.00"

    And now its good. The problem is that changing the currency list changes all numbers cells formated as numbers, date or currency. I want it changes only the ones formatted as Currency and leave the other ones without any change... maybe its not possible...

  12. #12
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Re: Change Currency Symbol on Worksheet based on cell value

    Good point - try this

    Please Login or Register  to view this content.

  13. #13
    Forum Contributor
    Join Date
    06-25-2012
    Location
    Porto, Portugal
    MS-Off Ver
    Excel 2010
    Posts
    201

    Re: Change Currency Symbol on Worksheet based on cell value

    Now it does nothing

  14. #14
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Re: Change Currency Symbol on Worksheet based on cell value

    Please see the attached.
    Attached Files Attached Files

  15. #15
    Forum Contributor
    Join Date
    06-25-2012
    Location
    Porto, Portugal
    MS-Off Ver
    Excel 2010
    Posts
    201

    Re: Change Currency Symbol on Worksheet based on cell value

    Man youre an angel! I didnt notice any difference between the previous code you sent me and i sad it does nothing. Maybe i just putted it wrong previous. Now it works perfectly. I think this thread will help lots of people because i've search a lot of forums, posts everithing on google and all i could foud was change by a range and not like this. As for your help i'm doing what you ask on your signature please consider donating to Cancer Research UK or your local equivalent". Thank you very much. PS - sorry my english but i'm from Portugal.

  16. #16
    Forum Contributor
    Join Date
    06-25-2012
    Location
    Porto, Portugal
    MS-Off Ver
    Excel 2010
    Posts
    201

    Re: Change Currency Symbol on Worksheet based on cell value

    It funny though if i put your code into my file it doesnt work. Any idea why?

  17. #17
    Forum Contributor
    Join Date
    06-25-2012
    Location
    Porto, Portugal
    MS-Off Ver
    Excel 2010
    Posts
    201

    Re: Change Currency Symbol on Worksheet based on cell value

    Found it. Has to do with formatting currency. Changed for € Portugal and now the code works just fine. Thanks a lot!

  18. #18
    Forum Contributor
    Join Date
    06-25-2012
    Location
    Porto, Portugal
    MS-Off Ver
    Excel 2010
    Posts
    201

    Re: Change Currency Symbol on Worksheet based on cell value

    Sorry disturbing you again but found another problem.... The code works perfectly but only in cell that i put the numbers. Let me explain: if i put numbers in cells and format them as currency, when i change the currency in menu sheet they change too, but if i make another cell with formulas that for example sum all values (currencies) and that cell is formatted as currency too it doesnt change to the selected currency. You can see what i'm saying in the file attached. In menu sheet i have Amount A and Amount B and above Total (which is the SUM of this 2 values). This Total cell is formatted as Currency too, but if i change the currency all formatted currency cells change except the ones that have formulas inside even if they are formatted as currencies. Need to say that formulas can vary and are present in the whole workbook...
    Attached Files Attached Files

  19. #19
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Re: Change Currency Symbol on Worksheet based on cell value

    OK - here is a new version.

    Please Login or Register  to view this content.

  20. #20
    Forum Contributor
    Join Date
    06-25-2012
    Location
    Porto, Portugal
    MS-Off Ver
    Excel 2010
    Posts
    201

    Re: Change Currency Symbol on Worksheet based on cell value

    One word only: GENIOUS!! That's what you are :D Thank you very much. PERFECT!!!

  21. #21
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,361

    Re: Change Currency Symbol on Worksheet based on cell value

    Based on your last post it seems that you are satisfied with the solution(s) you've received but you haven't marked your thread as "SOLVED".
    For the meantime I'll do it for you.

    How?
    New quick method:
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

    Or you can use this way:

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save

    Note:
    You can also thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given.
    By doing so you can add to the reputation(s) of those who helped and shared their time in helping you.
    I think people forget the word "THANK YOU!!!!" Do you still know it???

    There is a little star ( ADD REPUTATION ) below those person who helped you. Click it to say your "PRIVATE APPRECIATION TO THEIR EFFORT ON THEIR CONTRIBUTIONS "

    Regards,
    Vladimir

  22. #22
    Forum Contributor
    Join Date
    06-25-2012
    Location
    Porto, Portugal
    MS-Off Ver
    Excel 2010
    Posts
    201

    Re: Change Currency Symbol on Worksheet based on cell value

    Thank you. Didnt notice that. I'll be more careful next time.

  23. #23
    Forum Contributor
    Join Date
    06-25-2012
    Location
    Porto, Portugal
    MS-Off Ver
    Excel 2010
    Posts
    201

    Re: Change Currency Symbol on Worksheet based on cell value

    Need help again.. found another problem..
    If you see in my next file, if i change the currency it changes the cells that have values formatted as currency and changes formulas that sum these values. Thats all ok... But... in my file i have cells formated as currency too which dont have any values written on it. So if i change the currency for instance £ and now i'm gonna write some values in a cell with nothing on it but that is formated as currency it gets the simbol of the previous formated currency (which is in this workbook €). There is no way of make the macro to change the cells that are formated as currency and have nothing writen on it to change to the selected currency too without having to run the macro again. Yes i could run the macro again that it would now convert these cells in the currency format i want but it a slow process (because in my original file i have more than 600 worksheets which the macro runs - the whole process takes about 14 minutes) and once i change the currency i would like all cells formated in currency get that format even if they dont have nothing written on them.

    Another problem is if a cell is equal to a value in another cell it dont change the currency symbol.
    Attached Files Attached Files
    Last edited by Taislin; 01-04-2013 at 03:58 PM.

  24. #24
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Re: Change Currency Symbol on Worksheet based on cell value

    Please Login or Register  to view this content.
    This seems to do what you need but its going to be slower that your alternative. The difficulty is identifying cells which are formated but empty in an efficient way - I would be interested to know if others have suggestions.

  25. #25
    Forum Contributor
    Join Date
    06-25-2012
    Location
    Porto, Portugal
    MS-Off Ver
    Excel 2010
    Posts
    201

    Re: Change Currency Symbol on Worksheet based on cell value

    @mrice

    Thank you for your quick response but that doesnt work. It only changes the already writen values. It does nothing to the values i write in cell C10 and nothing too about C11. I really dont have a problem even if the macro takes a whole hour, because this process is intended to be executed only one time. Thank you

    EDIT: I was working around with format currency cell and i think the problem why macro isnt working properly is because of the currency format used in macro code. Because if i put the cells C10 and C11 in to custom format for a format as this one £#,##0.00 now it changes all even if cells are empty. I figured this out because when i changed to pouds and went to format saw it was now custom. So the code created that custom format. Maybe thats why i have the problem because the cells currency are formated as the attached image, where it gets the € symbol as predefinition and dont know what format excel is using for it. So when macro looks for € cells may not be looking for the exactlycurrency i have formated th workbook. Dont know if i made myself clear.

    EDIT2: As i said before it really as to do with cell format in first place and then the one that is in vba code. As you can see in my image i formated as EURO, the first option that excel offers when we select currency in cell format. In vba code the euro format has this code [$€-816] which is for Portugal - Euro. Which is fine because i'm from Portugal. The problem is that the whole workbook as the currency format as EURO standard that appears as first option and not Euro - Portugal. I'm guessing that the format i use as a different code. Just dont know what is it. Because in the sample workbook when i change all the cell that have euro currency to Euro - Portugal and now run the macro to change the currency, now cells C10 and C11 change too even if they have any values. So and for not have to change all format currencies in the workbook to Euro - Portugal can you please tell me what the code of the format i'm using? I'm positive thats the problem so if anyone can help i would really be apreciated. Thank you
    Attached Images Attached Images
    Last edited by Taislin; 01-04-2013 at 08:41 PM.

  26. #26
    Forum Contributor
    Join Date
    06-25-2012
    Location
    Porto, Portugal
    MS-Off Ver
    Excel 2010
    Posts
    201

    Re: Change Currency Symbol on Worksheet based on cell value

    SOLVED IT :D :D :D

    After thinking a little bit i figured it out. As the previous edits i made in the previous post i sad that the problem was with the code of vba for € format. As my currency is formated in € and not € Portuguese (Portugal) as the vba code refers, i though of saving a macro and select the simbol € as formating in currency to see what code excel shows in vba and what i got was a simple
    Please Login or Register  to view this content.
    So my cells currency predifinition in the workbook are € with the above code and not the one provided with the excelent macro that mrice build.
    So i made a minor change to the code he gave and voilá
    Please Login or Register  to view this content.
    Now empty cells change and the other ones that refers values from other cells (C10 and C11) change too, because now macro can find the € symbol that i was using in the workbook. Sometimes we have to think and do a little of work too and not wait to profissionals like mrice and many others in this forum do all the work for us. We have to lern a little bit from their knowledge too.
    Really happy to solved this.
    Thank you a lot mrice. You were a great help. Without you i would never get there. Many thanks.

  27. #27
    Forum Contributor
    Join Date
    06-25-2012
    Location
    Porto, Portugal
    MS-Off Ver
    Excel 2010
    Posts
    201

    Re: Change Currency Symbol on Worksheet based on cell value

    This macro is really slow. let it run all night and not finished yet. Any ideas to make it faster?

  28. #28
    Forum Contributor
    Join Date
    06-25-2012
    Location
    Porto, Portugal
    MS-Off Ver
    Excel 2010
    Posts
    201

    Re: Change Currency Symbol on Worksheet based on cell value

    I dont mind having a slow macro since it not takes the whole night to finishes the process. it still not finished. Come on people this is the last thing i need to finish my workbook. This macro works as it is now but is extremely slow. How to make it faster? Alternatives.
    Last edited by Taislin; 01-05-2013 at 08:17 AM.

  29. #29
    Forum Contributor
    Join Date
    06-25-2012
    Location
    Porto, Portugal
    MS-Off Ver
    Excel 2010
    Posts
    201

    Re: Change Currency Symbol on Worksheet based on cell value

    I dont mind having a slow macro since it not takes the whole night to finishes the process. it still not finished. Come on people this is the last thing i need to finish my workbook. This macro works as it is now but is extremely slow. How to make it faster? Alternatives. This macro is so slow that it actually freezed my computer. In small workbooks like the sample i put in this topic it works but for my workbook forget it. Impossible to use.

  30. #30
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Re: Change Currency Symbol on Worksheet based on cell value

    You could try

    Please Login or Register  to view this content.

  31. #31
    Forum Contributor
    Join Date
    06-25-2012
    Location
    Porto, Portugal
    MS-Off Ver
    Excel 2010
    Posts
    201

    Re: Change Currency Symbol on Worksheet based on cell value

    @mrice

    Thank you foryour response. Tested this alternative and seems faster than the previous but only tested in the sample book. Then i'm gonna proceed to test it with my workbook. Meanwhile i stard to record some macros and came across with this solution made by me that seems to work. But once again i tested it only in this workbook i built and it works just fine too. Gotta test it to in my workbook to see if its faster than the macro you provided. Gonna leave here this sollution i came up with so you can see and may help anybody who has this problem too. Thank you
    Attached Files Attached Files

  32. #32
    Forum Contributor
    Join Date
    06-25-2012
    Location
    Porto, Portugal
    MS-Off Ver
    Excel 2010
    Posts
    201
    @mrice

    Yoir macro is still very lengthy. I had to force close excel because it was running the macro for hours. My solution also didnt work because I came up with a message from excel saying "that he could not complete the task with the avaiable resources". Then I closed it and try again and now the macro (which uses find replace dunction format) is giving error 1004 in vba. I close the workbook, open the sample woth that macro and the buttons I built and giving the same error again. It had worked perfectly before I tried to run it in my workbook ans now is gibong this error. Really don't understand. Take it work again I had to record the same macro manually doing the find/replace format thing. I giving hope this will ever work... gonna try one last thing. As my problem is that the first macro that mrice provided don't change format of the cells that as currency format on them but have nothing written, I though now and some commands to this macro so before she runs it creates 0 values entries to these empty cells then the macro would change their currency too (now because they are written) and then another command to erase the content of these cells again. Now the format currency of these cells should be changed. At least thats my hope. Gonma try it and see if it works.

  33. #33
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Re: Change Currency Symbol on Worksheet based on cell value

    The difficulty is identifying empty cells of interest without looking at the entire sheet. I'm running out of ideas so maybe I'll try one last one. If it is possible to apply a conditional format to the empty cells of interest, these should be straightforward to identify. Is this a possibility for you?

  34. #34
    Forum Contributor
    Join Date
    06-25-2012
    Location
    Porto, Portugal
    MS-Off Ver
    Excel 2010
    Posts
    201

    Re: Change Currency Symbol on Worksheet based on cell value

    Its not possible because i wolud have to aply conditional format to 365 sheets and for each sheet 500 rows at diferent ranges... so it woulb be possible but it would take a massive lenght of time... I did the other thing i said that i would try, that was built a macro to input values at the ranges of the empty sheets and now they changed and the format manteined. After the conversion another macro runs that erases all data inputed by the previous one. Not the best solution (because i didnt aplied this at the 365 sheets because the same reason i dont want to aply conditional format) but i did this to the month sheets (whitch are the most important ones) and it works. Not perfect, because i would like to have really all workbook changed but thats acceptable. Many thanks for your help mrice. Without you i wouldnt made this far. Really aprecciate your help.
    Regards from Portugal.

  35. #35
    Registered User
    Join Date
    10-15-2013
    Location
    UK
    MS-Off Ver
    2010
    Posts
    5

    Re: Change Currency Symbol on Worksheet based on cell value

    I've just stumbled upon this thread as I attempt to solve a similar problem albeit in a smaller spreadsheet that Taislin appears to be wresting with.

    Is there a way of identifying just those cells that are already formatted as currency (of whatever symbol) and then apply a new symbol or preferably a three letter international currency code? I have coded something using ranges but as the currency cells are dotted around the sheet it's impractical to code in every cell reference. I was looking for something that looked for cells already formatted as currency then changed the symbol or abbreviation with the one from a selection list that the user can select.

    I think the attached should illustrate what I'm trying to achieve. The test would be once the code is in place, I could add a number, format it as currency and then make a different currency selection in cell A1 that would change all currency cells including the new one, to the chosen currency.

    Thanks


    J
    Attached Files Attached Files

  36. #36
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Change Currency Symbol on Worksheet based on cell value

    Jason66

    Welcome to the forum.

    Unfortunately as per forum rules you have to start your own thread.

    If you feel an existing thread is particularly relevant to your need, provide a link to the other thread in your new thread.

    Old threads are often only monitored by the original participants. New threads not only open you up to all possible participants again, they typically get faster response, too.
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  37. #37
    Registered User
    Join Date
    10-15-2013
    Location
    UK
    MS-Off Ver
    2010
    Posts
    5

    Re: Change Currency Symbol on Worksheet based on cell value

    Argh, sorry about that, I'll start a new thread :-)

    J

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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