Formatting of number with currency symbol - excel

I am values in Excel with format (e.g. ₹18.05 with custom format as [$₹-ur-IN]#,##0.00. There are times when the values are displayed as ₹0.00. In the cases the value happen to be ₹0.00, I want to display blank cell. Please let me know what changes are required in custom format to achieve the same.
Thanks

The format is specified as
<Format for positive values>;<Format for negative values>;<Format for zero values>
You can just provide no format for the case where you have a zero:
[$₹-1FAE37]#,##0.00;-[$₹-1FAE37]#,##0.00;
depending how you want to handle any negative values.
Semicolon (;) may be a different character in your locale.

Related

Save number format by default in Excel

I would like to save number format with comma delimiter as default in Excel.
So number 123456.78 will always look like 123,456.78
How can I do this ?
Excel general number formatting is based on your locale. This contains a "Digit grouping symbol", filling this is will change your format accordingly.
Be aware this is not only done for Excel, but for every application on your computer, based on this format.
Home/Styles: Right click on Normal and select Modify
Change the Number style
from General either to Number + use thousands separator
or, if you want to use Scientific notation when over a certain amount, perhaps
[<100000000]#,##0.00;General
or whatever you want.

Excel if formula possibility

I have an issue that I don't personally know how to format. I need to subtract numbers that are in seconds, formatted to be viewed as 58.43 or 59.99, but that are sometimes in minutes, formatted as 1:01.33 for example.
I would also need to be able to subtract the numbers from each other to be recognized as (+1.08) or (-0.78), with the parentheses.
I'm sure I can elaborate somewhere, so let me know if this doesn't make any sense. Thanks
It depends if 58.43 is formatted as a number or time. Date and time are stored in number of days, so the time 58.43 is actually stored as the number 0.00067627314814814800000 (58.43/24/60/60).
If both values are time values, then the custom number format of the result can be:
(+s.00);(-s.00);(0.00);#
To handle both cases, instead of =A1-A2 you can try this something like this:
=IF(A1<1,A1,A1/86400)-IF(A2<1,A2,A2/86400)
If those are just time values formatted as mm.ss then you can use TIMEDIFF()
https://support.office.com/en-us/article/Calculate-the-difference-between-two-times-e1c78778-749b-49a3-b13e-737715505ff6
If not, try to convert them to time values and than use TIMEDIFF()
The first part is straightforward
Apply a default format of
ss:00
Then in conditional formatting use a formula
=A2>=TIME(0,1,0)
and apply a format of
m:ss.00
for the ones that are a minute or more.
There is no direct solution to the problem of displaying negative times short of changing the default date system used by Excel as you can see in a number of references. The only way to do it here is to test whether the result is positive or negative and display the positive difference with or without a minus sign.
=IF(B2>=A2,TEXT(B2-A2,"(+s.00)"),TEXT(A2-B2,"(-s.00)"))
The downside of this is that they are actually text values and you can't use them in any further calculations. However the results of A2-B2 are still good even if you can't display them directly, so you can use A2-B2 in subsequent formulae if you want to even if it is negative.

Why do Excel values in parentheses become negative values?

A colleague and I encountered a behavior in Excel which isn't clear to us.
Background:
We have a tool which converts an Excel sheet into a table format. The tool calculates the formulas which are in excel and replaces variables inside it with specific values.
The excel tool is used by one of our customers who use values like (8) or (247).
These Value are automatically translated by excel to -8 or -247.
Question:
I saw that many people want to display negative numbers in parentheses. But why would Excel change values in parentheses to a negative number?
I know that I could simply change the cell config to text and this would solve the problem but I wonder if there is a reason for the behavior, since there seems to be no mathematical reason for this.
Its simply the different format of cells you are bringing the "values from" and "pasting to". ..... numbers with parentheses are in cells with "accounting" format and negatives are stored in general or standard number formated cells. To resolve you can change the format of destination cells to accounting using cell formatting as number>accounting.
To answer the why, it's because accountants put negative numbers in brackets for readability
Unfortunately, this is one of the excel feature/bugs that helps some folks and frustrates others. When opening a file or pasting content, excel will immediately and always try to parse any values into formats it deems appropriate, which can mess up data like:
Zip Codes / Tel. # → Numeric: 05401 → 5401
Fractions → Dates: 11/20 → Nov, 20th YYYY
Std. Errors → Negative Numbers: (0.1) → -0.1
For some workarounds , see Stop Excel from automatically converting certain text values to dates
Once the file is open/pasted, the damage is already done. At that point, your best bet is:
Updating the field and displaying as text (appending with ') to prevent re-casting
Formatting the field if the operation wasn't lossy and is just presenting the info differently
Running a clean if/else to pad or other convert your data based on the identified errors
Specific to displaying values back in parens, if excel is converting them and treating them like negative numbers (which may or may not be the appropriate way to actually store the data), you can apply a different format to positive and negative numbers to wrap back in parens.
It is standard practice to write negative values as numbers in parentheses, especially in accounting. This makes negative values stand out much more than a simple negative hyphen; compare -1 and (1).
Excel is a tool very commonly used by accountants and supports accountant-style spreadsheets. Therefore, entering (100) means having a value of -100, even if there is no minus hyphen!
Here is a fun fact, if you enter (-10), Excel will treat it as normal text.

Currency summation in Lotus Notes

We have designed the LN forms with editable fields.User enters the amounts in the editable fields. We are converting the these amounts to currency using 'CCur'. The actual issue is user enters the amounts with decimal separator either as comma(,) or dot(.). When converting the amounts to currency it is not considering the decimal and thousands separator.
Example:
User enters amounts as below: Amount1 = 2090,Amount2 = 1500,90 and Amount3 = 800
In the current case the TOTAL AMOUNT is calculated as 152980.00 which should be 4390.90
How can I achieve this? Do we have user specific settings in LN which automatically takes care such things?
Regards,
Kishore
It sounds like your currency formats may not be set up correctly, and thus the locale of the client being used to enter the value 1500,90 is one that assumes the comma is a thousands separator, and the period is a decimal separator.
Here is one section of the documentation to check-out. You may need to confirm the field settings on the form to see if a custom currency format has been specified. Otherwise, see what the user preferences of the client says
For this question, I am not clear that why are you using comma as a decimal separator, I guess that it is not a formal way for storing the currency value. I can understand. this is your requirement. Just Take this as a suggestion. Okay We have the field property, First you change the field type as Number. And set the field control property, Number format is as currency and Change the User preference as Custom. There you can find two kind of settings enabled. Here you change the thousand separator into a different symbol. But I guess that you can not give multiple separator for decimal or thousands. Also If you give the same symbol for both things. It will be conflict.
My opinion- Based on your requirement, You do replace the comma with dot before applying the Ccur().
#Ramkumar: I don't agree. Set the field settings to Numeric and "User settings", not "custom". The users need to use the correct decimal point, if they are in a country where a period is used for decimal point, they use that, if they are in a country where they use comma as decimal point, they use that.
Kishore, you could add a field validation on the numeric field to make sure the value is numeric.
Use #IsNumber for this.

I want to edit my decimal number.How I give it pattern?

I want to give a pattern in cognos. like this
my number : 12.20
my wanted number : 12.2 i want to delet 0 how I give pattern.
If no data format is mentioned, then the default format will take care of trailing zeros.
But if you are using some data format (number, currency) then the trailing zeros will be added till the mentioned decimal places in your format.
To suppress a digit if the value is zero, you can use pattern attribute in the Data Format property.
In your example, to suppress 2nd decimal place zero, you can mention the pattern as
.0#
With this pattern, first decimal place digit will be shown even if the value is zero. Whereas, second decimal place digit will not be shown even if the value is zero.
Please refer to IBM Cognos inforcenter for Decimal Format Symbols for the Pattern. http://publib.boulder.ibm.com/infocenter/c8bi/v8r4m0/index.jsp

Resources