Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to format a cell as percentage with two decimals. I used format cell and keep the decimal places as 2. But I want to restrict the full numbers to two.

Ex:23.45%

Then I used a custom format like

00.00%

But I couldn't restrict the entering more than two numbers before decimal place.

share|improve this question
up vote 2 down vote accepted

Perhaps the simplest way to do this would be to use data validation. In the Data tab select data validation then in the settings tab set the type to decimal and restrict to between 0 and 1. If you then set the cell type to percentage then values will be represented in the format you want.

share|improve this answer

As already answered, use:

  • The percentage formatting for the final rendering
  • The data validation for the input restriction

BUT: you need to set it up as user defined validation, with a formula like the following, considering D2 is your reference cell:

=IF(D2=TRUNC(D2;2);TRUE;FALSE)
share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .