+ Reply to Thread
Results 1 to 5 of 5

$ sign in front of value

  1. #1
    Forum Contributor
    Join Date
    12-11-2009
    Location
    Toronto
    MS-Off Ver
    Excel 2010
    Posts
    517

    $ sign in front of value

    Hi, i have this code but cant seem to figure out how i can put a dollar sign in front. Code below does not put a $ sign in front of this value 2220.45-. Would like it to display as $2220.45-

    Please Login or Register  to view this content.

    Thanks

  2. #2
    Forum Expert
    Join Date
    02-22-2013
    Location
    London, United Kingdom
    MS-Off Ver
    Office 365
    Posts
    1,217

    Re: $ sign in front of value

    If it's not a numeric value, then use e.g. "$@" as numberformatting or "$#,##0.00;$-#,##0.00;$#,##0;$@"
    Last edited by berlan; 05-28-2015 at 04:54 PM.

  3. #3
    Forum Contributor
    Join Date
    12-11-2009
    Location
    Toronto
    MS-Off Ver
    Excel 2010
    Posts
    517

    Re: $ sign in front of value

    Quote Originally Posted by berlan View Post
    If it's not a numeric value, then use e.g. "$@" as numberformatting or "$##,##0.00;$##,##-0.00;$##,##0;$@"
    Thanks Berlan, that worked but what does $@ do?

  4. #4
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    12,362

    Re: $ sign in front of value

    Is the trailing hyphen supposed to indicate a negative value, or does the trailing hyphen have some other meaning?

    That number format should format the number 2220.45 to display as $2,220.45. That number format will not have any effect on the text string "2220.45-". If you are entering a number with a trailing minus sign, I would expect Excel to treat it as text, which does not respond to number formatting.

    Assuming that is supposed to be a negative indicator, I would use a two part number format code $##,##0.00+;$##,##0.00-. This will format the number +2220.45 as $2,220.45+ and the number -2220.45 as $2,220.45-. Note that you will enter negative numbers with a leading minus rather than the trailing minus.

    I would suggest this help file to understand the available number format codes: https://support.office.com/en-US/Art...rs=en-US&ad=US
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  5. #5
    Forum Expert
    Join Date
    02-22-2013
    Location
    London, United Kingdom
    MS-Off Ver
    Office 365
    Posts
    1,217

    Re: $ sign in front of value

    It will display any text in the cell, not only the numerical values as implied by the "0.00" (with 2 decimals shown).

    In the example with multiple sections of numberformating:
    "$#,##0.00;$-#,##0.00;$#,##0;$@"
    value >0
    value <0
    value = 0
    text value

    Hope that helps.

    Best, berlan

+ 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. Replies: 3
    Last Post: 03-13-2013, 01:20 AM
  2. [SOLVED] Extract text before @ sign
    By burak2102 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-13-2012, 05:45 PM
  3. Text saved with ^ and ' sign ??
    By dukof in forum Excel General
    Replies: 2
    Last Post: 07-24-2008, 04:59 PM
  4. Equal Sign As Text
    By Trussy in forum Excel General
    Replies: 1
    Last Post: 01-05-2006, 08:00 PM
  5. [SOLVED] XL invoice replace the dollar sign with euro sign
    By Pamela casares in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 12-16-2005, 04:25 PM

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