Excel format cells - excel

I have custom format cells but I don't know what does it meaning? Could you guys help me? Thank you.
0.0_);[Red](0.0)
P/s Is there any reference documents about this format ? If it exist please tell me.

A number format in excel can have up to 4 sections,
<POSITIVE>;<NEGATIVE>;<ZERO>;<TEXT>
This formatting will apply if the number in a cell is positive, negative, zero or a text respectively. In your case the format has 2 sections which is for positive and zeroes and then one for negatives.
0.0_); - for positive and zeroes
[Red](0.0) - for negatives
1) 0.0 - This is to format all the numbers to a single decimal place. For example 1234 will become 1234.0 and 1234.56 will become 1234.5
2) _) - the underscore followed by a parentheses ) is to apply spacing at the end so that it is inline with the negatives which are enclosed with parentheses.
3) [Red]() - negatives will be represented in red color font enclosed with parentheses.
A picture can speak a thousand words,
You can find more info and much more helpful formatting methods in the Microsoft Documentation and of course google

Related

How to use 'less than/Greater than' formula with negative numbers in excel

I would like to create a formula which calculates if a number is in between two numbers. If both are positive numbers it works, however, if one is negative it always returns false why is this and what can I do to fix it?
My formula is as follow
=IF(AND(W25<=AA13,AA13<=V25),TRUE,FALSE)
Below is an example of the numbers and the cells
-10 <= 0.326 <= 100
(W25) (AA13) (V25)
Thanks in advance!
EDIT
I've split it up to see which one is causing issues it is:
=AA13>=W25
I typed in =ISNUMBER(W25) and it's come back with false
Check the negative sign in your data. I can recreate this if the -10 is in text format, or if the negative sign was copied from somewhere else that replaced the hyphen with the ascii character with the code of 150.

Excel Accounting Format - Indian Style

Indian style number formatting works with Lakhs and Crores.
A Lakh is "100,000" in US Style, but would be "1,00,000" in Indian Style.
A Crore is "10,000,000" in US Style, but would be "1,00,00,000".
I have not been able to figure out the custom number formatting syntax sufficiently to be able to do the following:
Accounting Style currency is left justified
Negative numbers in red
number formatting described above
How can I do this?
I don't think it will change anything in this case, but I am on Excel for Mac (Office 365 Version).
This is what I found in Quora:
Select the cell
Press ctrl + 1
Numbers > User Defined
Write this:
[>=10000000]##\,##\,##\,##0;[>=100000] ##\,##\,##0;##,##0
or
[>=10000000]"RS "##\,##\,##\,##0;[>=100000]"RS " ##\,##\,##0;"RS "##,##0
I couldn't see a way of adding the second part of the question (negative numbers in red) without adding a couple of conditional formatting rules:
Format values where the formula is true
=A1<=-100000
With number format
[<=-10000000]##\,##\,##\,##0;[<=-100000] ##\,##\,##0;0
( or just
[<=-10000000]##\,##\,##\,##0;##\,##\,##0
since you already know it's <=-100000)
and
Format values where the formula is true
=A1<0
With number format
##,###;##,###;##,###
and also set font to red in both cases.
The issue was that the first format always displays minus signs for negative numbers > -100000. If you didn't mind the minus signs appearing as well as the red font, you could use
[<=-10000000]-##\,##\,##\,##0;[<=-100000]-##\,##\,##0;-##,###
for all of them.
BTW I'm testing this on Excel 2010 so 365 may be slightly different.

Cell formatting for Millions of dollars

I'm working with large numbers here, so I want to save space in each cell by displaying
$1,782,543 as $1.78M
I'm formatting the cell using the following custom formatter:
$#.0,," M";
It seems to be working, except when the number is negative. Then it displays nothing. Any idea what could be causing this?
Perhaps there is a better way to do this.
What comes after the semi-colonis the format applied to negative values, as you have nothing after the semi-colon negative values are blank......so just leave out the semi-colon and the same format is applied to all values, positive negative or zero (but with "-" sign for negative numbers), i.e. use just
$#.0,," M"
The format for a custom number format is <positive number>;<negative number>;<zero>;<text>.
If you add some format masks for the other possible number variations you should be fine. Example:
$#.0,," M"_);[Red]($#.0,," M");[color14]_(* "-"??_);[color5]_(#_)
          
The above will supply your desired format in black digits, negative numbers in the same number format but bracketed and colored red; grey hyphen in place of zeroes and blue text.
Try this format:
$#.0,," M";-$#.0,," M";$#.0,," M";

How to format Microsoft Excel data labels without trailing decimal on round values?

(Not sure if this is the best stack for this question).
What is the format to have 14500 read as $14.5K but to have 3000 read as just $3K without the trailing decimal point?
I can't seem to comprehend the correct expression from the manual.
Excel does not appear to support this functionality using custom format codes. However, there is a way to simulate this. Create a new column that uses the function ="$"&A1/1000&"K".
Original ="$"&A1/1000&"K"
$3,500 $3.5K
$3,000 $3K
$14,500 $14.5K
$13,300 $13.3K
$25,000 $25K
$250,000 $250K
To get this to work, I formatted the cell's of the data column 4
4
4
4
3.5
13.5, by either selecting the column and then right click and format cells or by right clicking on the chart and selecting format data labels.
I formatted this with the regular expression $#K so that the data then shows as
$4K
$4K
$4K
$4K
$4K
$14K. The consequence is that the number is rounded to not include the decimal.
Now, all i needed to do was separately format the individual cell's that had decimal values by right clicking on the individual cell's and changing their format to #.0K.
Thus we now have, $4K
$4K
$4K
$4K
$3.5K
$13.5K
Also, the , can be used in the regex ($#,K for round numbers, $#.0,K for decimal) for data of thousands, like my original question.
This was an acceptable solution for me because there were only two such fractional data points.
For a larger dataset, you will need to use a conditional expression to determine all the cell's that have decimal values.
One way to do this, is like so:
If your numbers are in column B, apply this formula for column C
=B1=INT(B1)
This will show TRUE if the data is of INT data type (no decimal precision) and FALSE if not.
Now, select column C and select Data\Filter\Autofilter
From the drop-down list in C1, select FALSE
This will show only the decimal numbers and hide the whole numbers.
And now you can apply the relevent formatting as described above.

Conditional Decimal Format

I want to format a number with two decimals unless it's 0. Can I do this?
123.93
23.00
144.34
0
2.38
This works great:
Go to format cells and select custom. Then paste this 0.00;[=0]0 into the Type field
from http://www.ozgrid.com/Excel/CustomFormats.htm
Try this:
=IF(A1=0,"0",TEXT(A1,"0.00"))
An alternative that includes a separator for thousands, shows negative values in red font and aligns zeros with whole numbers:
#,##0.00;[Red]-#,##0.00;0
(for the alignment, there are three blanks at the end).
From Excel Help:
A number format can have up to four sections of code, separated by
semicolons. These code sections define the format for positive
numbers, negative numbers, zero values, and text, in that order.
;;;
So All you really need to do is something like 0.00,-0.00,0

Resources