Forum Discussion
Ibrahim1065
Mar 04, 2022Copper Contributor
How to create a custom format for number and text in the same cell?
Hello,
I am trying to create a custom format for cells that contains both number and text as follows:
| 29558 (45.1%) |
| 537 (9%) |
| 3749 (5.3%) |
The cell always contains a number followed by a space and then another number and percentage sign within brackets
n (n%)
Ideally, the custom format would add a thousands separator to the first number and a decimal point with significance to the tenth digit to the second number.
When applying the format to the cells it should transform the above table to the following:
| 29,558 (45.1%) |
| 537 (9.0%) |
| 3,749 (5.3%) |
In the above example I colored the difference in red just for clarity but I do not need the formatting code to change the color.
Is this possible in excel on Mac?
Any guidance is appreciated.
1 Reply
- mtarlerSilver Contributorshort answer is no.
But a macro could be written to do it.
Where do these numbers come from? Why not have them in different cells? If you have them in different cells you could then use a cell formula to concatenate them into a single cell (but will be text, not numeric as Excel doesn't recognize any format like that).