Reputation: 1723
I have formatted the columns as follows:
_($* #,##0.00_);_($* (#,##0.00);_($* "-"??);(@_).
If I copy paste the value then it doesn't work. But if I type 1234, then it automatically converts to $ 1,234.
But how can I make it work even I do pasting.
I googled it and found that conditional formatting is used in these scenario.(Am I right?)
I tried doing conditional formatting also but could not secceed.
Can somebody tell me how to achieve this in conditional formatting:
Any type of help is appreciated.
Thanks.
Upvotes: 0
Views: 810
Reputation: 59495
If what appear to be numbers are imported as text there is likely to be a warning of this in Excel (a small green triangle in the top left of the cells - for all recent Excel versions can be turn on/off in Options, Formulas, Error Checking). By selecting a range that includes the first instance, these strings can be converted to General format (so that values are recognised as numbers) by clicking the warning icon and Convert to Number.
Then 'standard formatting' can be applied, perhaps:
` $* #,##0 ;($* #,##0)`
and empty cells selected with HOME > Editing - Find & Select, Go To Special..., Blanks then formatted Alignment Center and contents entered with Find (nothing) and filled with hyphens with Replace with -
.
Upvotes: 0
Reputation: 16899
When you paste something into a cell in Excel, by default, the format is also pasted. To prevent this, you must do a Paste Special, then choose to only paste the Value.
For the conditional formatting of the currency, you can set up a rule that looks like this:
Getting a '-' to appear in a blank cell is not possible in Excel formatting rules. A dash can be inserted as formatting, but only as long as there is actual data in the cell. If the cell is blank, Excel will not display any characters.
Upvotes: 3