How to change the colored cell values into special character using excel macro or by excel formulas?

How do i change the colored cell values.

Using conditional formatting I have changed the cell value into red using a condition

  • cell value is = less than or equal to(zero)

After that I want to change those red colored cell values filled with '-'.

Answers


Create a "Custom" format for the target cells:

In the Type window you have 3 areas divided by semi-colons:

£#,##0.00;-;-

The first section will be applied to positive numbers - the second to negative and the third to zero. Just type in the formats you want.

Works like this:


Need Your Help

How to add leading zeros?

r formatting number-formatting r-faq

I have a set of data which looks something like this: