Forum Discussion
Cell formatting
I would like to apply some number formatting and add some text, let's say, at the end of a cell. For instance, for the formatting code (with 4 sections):
[Red]General;[Green]General;[Blue]General;" USD" @
I would expect some colored values, any followed by USD text. This is not happening (the text part) !
Please help !
PS: I am not looking for an altenative solution, I would simple like to use what's written in excel help:
Include a section for text entry If included, a text section is always the last section in the number format. Include an "at" character (@) in the section where you want to display any text that you type in the cell. If the @ character is omitted from the text section, text that you type will not be displayed. If you want to always display specific text characters with the typed text, enclose the additional text in double quotation marks (" "). For example, "gross receipts for "@
If the format does not include a text section, any non-numeric value that you type in a cell with that format applied is not affected by the format. In addition, the entire cell is converted to text.
You have to add the text to each section:
The custom format that I applied is
[Red]General "USD";[Green]General "USD";[Blue]General "USD"
- crios339Copper Contributor
Thak you for your reply. I knew that the code worked if you add a text to each section.
However, I cannot display the information I'd like, using the information from MS Support site. Please have a look here and here. As you can see, a custom format code can have up to 4 sections, from which the last is used for text. Please use the provided example ([Blue]#,##0.00_);[Red](#,##0.00);0.00;"sales "@), and tell me if you can see any "sales" text next to any type of value. In my understating, the "sales" text should have been automatically added before or after (?) any type of value. On the other hand, it may be that the "sales" text appears (next to cell value) only if in that cell is a text, not a value.
The fourth section is for text values only, not for numbers. The @ in that section stands for the text value as entered. The text in quotes is added to the cell value.
In the screenshot above, you can see in the formula bar that the active cell contains the text Weekly, but because of the custom format, it is displayed as sales Weekly in the cell.