+ Reply to Thread
Results 1 to 4 of 4

Change currency symbol of multiple cells depending on input into another cell

  1. #1
    Registered User
    Join Date
    05-11-2009
    Location
    Melbourne, Australia
    MS-Off Ver
    Excel 2003
    Posts
    8

    Change currency symbol of multiple cells depending on input into another cell

    Basically I want the currency symbol to change between $ and ¥ in cells U32:u40 and Q32:Q34 in Quotation! worksheet depending on whether the value of summary!d6 is Australian dollars or Japanese Yen.
    Ideally the solution would also allow commas as "thousand seperators" ie. 1,000,000,000 and allow calculations to be made rather than Excel just thinking its text.

    As you will see I found some code which helped another user on this site and I tried to tailor it to my worksheet without success.

    Would really appreciate your help.
    Attached Files Attached Files

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Change currency symbol of multiple cells depending on input into another cell

    Looking at your code - the Case tests don't tie out to the currency your applying.

    I'd also say that it's a good idea to force both criteria and test into a common case (lower/upper), eg:

    Please Login or Register  to view this content.
    If the formats themselves are the problem post back and let us know accordingly.

  3. #3
    Registered User
    Join Date
    05-11-2009
    Location
    Melbourne, Australia
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: Change currency symbol of multiple cells depending on input into another cell

    Thank you very much for your quick reply.
    It worked beautifully so I am very grateful.

    I just made some minor changes to suit the required style as you will see.

    There is only one small issue.
    If the value of the cell is zero the A$ or yen symbol still appears.
    Is there any way of changing the code so that when the value is zero the cell is left blank?

    I tried to do it myself as you will see from the attachment but without success.
    Attached Files Attached Files

  4. #4
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Change currency symbol of multiple cells depending on input into another cell

    I'm rushing a bit so I confess I've not looked at the file but in general terms custom formats can be seen to comprise four parts:

    format for positive; format for negative; format for zero; format for text

    so it follows that if you want a blank simply add two semi-colons to the end of each of your format strings
    (technically you don't need both - one would suffice - but it's perhaps more transparent that way)

    for more info. on formatting etc: http://www.ozgrid.com/Excel/CustomFormats.htm http://simoncpage.co.uk/blog/2008/09...er-formatting/

+ 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