Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I know of a custom format for text to add parenthesizes:

(@)

[example, "something" becomes "(something)"]

And I know one for numbers:

(0)

[example, "15" becomes "(15)"]

Is there a wildcard character for both text and numbers?

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

You can combine them with a semicolon, as in (0);(@). This also works with the TEXT function - just enclose the format within quote marks.

share|improve this answer
    
If nothing better exists, I guess this is the way to go. I just noticed this does not work if it is in a different order as "(@);(0)". Any idea why? –  user1744318 Jun 26 '13 at 17:21
    
Yes, there are actually four parts of a custom format that Excel will recognize: a part for positive numbers, one for negative numbers, one for zeroes, and one for text. If only one part is given, then it is applied to all numbers. Text always has to come last. Neat trick that is actually sometimes useful: ";;;" will show as nothing! –  chuff Jun 26 '13 at 18:00
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.