+ Reply to Thread
Results 1 to 4 of 4

Dr or Cr Custom Number Format - Explanation Needed

  1. #1
    Registered User
    Join Date
    06-21-2012
    Location
    Ireland
    MS-Off Ver
    Excel 2016, Office 365
    Posts
    48

    Dr or Cr Custom Number Format - Explanation Needed

    Hi

    I saw a custom number format that displays Dr after the number (if the number is positive), or Cr (if the number is negative) as in the screenshot below.

    Can someone explain how exactly this custom format works, please.

    https://s25.postimg.org/iudfv2egv/De...tom_Format.jpg

    Thank you.

  2. #2
    Forum Expert
    Join Date
    02-14-2009
    Location
    .
    MS-Off Ver
    ................
    Posts
    2,840

    Re: Dr or Cr Custom Number Format - Explanation Needed

    See the first result for a detailed explanation of number formats.

  3. #3
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Dr or Cr Custom Number Format - Explanation Needed

    The number format string is split into 4 parts separated by semi-colons.

    The first part is the format to use for positive numbers.

    The second part the format for negative numbers.

    The third part the format for 0.

    The fourth part for text values.

    Anything in quotes in the formats, eg Dr or Cr, will appear as is.

    So what you are seeing is using the format 0 "Dr" for positive numbers, 0 "Cr" for negative numbers and 0 for, well, 0.

    Hope that explains a bit how the format you are seeing works.
    Last edited by Norie; 11-15-2016 at 06:23 AM.
    If posting code please use code tags, see here.

  4. #4
    Registered User
    Join Date
    06-21-2012
    Location
    Ireland
    MS-Off Ver
    Excel 2016, Office 365
    Posts
    48

    Re: Dr or Cr Custom Number Format - Explanation Needed

    Quote Originally Posted by Norie View Post
    The number format string is split into 4 parts separated by semi-colons.

    The first part is the format to use for positive numbers.

    The second part the format for negative numbers.

    The third part the format for 0.

    The fourth part for text values.

    Anything in quotes will in the formats, eg Dr or Cr, will appear as is.

    So what you are seeing is using the format 0 "Dr" for positive numbers, 0 "Cr" for negative numbers and 0 for, well, 0.

    Hope that explains a bit how the format you are seeing works.
    Thank you for your explanation and kindness.

+ 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. Need formula or code to convert number(s) from custom format to number format
    By tuongtu3 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-12-2015, 07:44 PM
  2. explanation custom cell format
    By guduchango in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-30-2014, 11:38 AM
  3. custom phone number format help needed
    By jcat3az in forum Excel General
    Replies: 1
    Last Post: 09-27-2011, 08:05 PM
  4. custom cell format needed
    By cosmicgrooves in forum Excel General
    Replies: 5
    Last Post: 01-26-2008, 06:17 PM
  5. [SOLVED] Custom percent format needed
    By Vasant Nanavati in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-06-2005, 07:05 AM
  6. [SOLVED] Custom percent format needed
    By Will Fleenor in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-05-2005, 10:05 PM
  7. [SOLVED] Custom percent format needed
    By Will Fleenor in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-28-2005, 10:06 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