# Excel - Changing the way a number is "rounded" and "fractioned"

In Excel
1) How can I control the way the program averages a number up or down? Example: If I enter 12.75, it will average it up to 12.80......Which I do not want.
2) How can I control the way the program shows a fraction? Example: If a calculated number comes to 6.5976, I would prefer it only giving me 6.6
3) Lets say I have a workbook that I use daily and there are some cells that I do not care to ever change or have changed, Is there a way to "lock" these cells?
###### Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Commented:
Hi,

In answer to the first two parts of your question, there are 3 rounding commands, ROUND, ROUNDUP, and ROUNDDOWN.  Find below the three relevant help pages.....

Rounds a number to a specified number of digits.

Syntax

ROUND(number,num_digits)

Number   is the number you want to round.

Num_digits   specifies the number of digits to which you want to round number.

·      If num_digits is greater than 0 (zero), then number is rounded to the specified number of decimal places.
·      If num_digits is 0, then number is rounded to the nearest integer.
·      If num_digits is less than 0, then number is rounded to the left of the decimal point.

Examples

ROUND(2.15, 1) equals 2.2

ROUND(2.149, 1) equals 2.1

ROUND(-1.475, 2) equals -1.48

ROUND(21.5, -1) equals 20

Rounds a number down, toward zero.

Syntax

ROUNDDOWN(number,num_digits)

Number   is any real number that you want rounded down.
Num_digits   is the number of digits to which you want to round number.

Remark

·      ROUNDDOWN behaves like ROUND, except that it always rounds a number down.
·      If num_digits is greater than 0 (zero), then number is rounded down to the specified number of decimal places.
·      If num_digits is 0 or omitted, then number is rounded down to the nearest integer.
·      If num_digits is less than 0, then number is rounded down to the left of the decimal point.

Examples

ROUNDDOWN(3.2, 0) equals 3

ROUNDDOWN(76.9,0) equals 76

ROUNDDOWN(3.14159, 3) equals 3.141

ROUNDDOWN(-3.14159, 1) equals -3.1

ROUNDDOWN(31415.92654, -2) equals 31,400

Rounds a number up, away from 0 (zero).

Syntax

ROUNDUP(number,num_digits)

Number   is any real number that you want rounded up.
Num_digits   is the number of digits to which you want to round number.

Remarks

·      ROUNDUP behaves like ROUND, except that it always rounds a number up.
·      If num_digits is greater than 0 (zero), then number is rounded up to the specified number of decimal places.
·      If num_digits is 0 or omitted, then number is rounded up to the nearest integer.
·      If num_digits is less than 0, then number is rounded up to the left of the decimal point.

Examples

ROUNDUP(3.2,0) equals 4

ROUNDUP(76.9,0) equals 77

ROUNDUP(3.14159, 3) equals 3.142

ROUNDUP(-3.14159, 1) equals -3.2

ROUNDUP(31415.92654, -2) equals 31,500

In answer to your third question you can not protect certain cells.  If you want to protect them you will need to protect the workbook or the worksheet, again find the relevant help below....

Microsoft Excel provides several ways to restrict how users can view or change data in workbooks and worksheets.

·      You can prevent others from changing some or all of the contents of an individual worksheet, viewing hidden rows or columns, viewing formulas, changing graphic objects, or changing saved scenarios. For a list of all worksheet elements you can protect, click  .
·      You can prevent others from adding or deleting worksheets in a workbook or viewing hidden worksheets. You can also prevent others from changing the size and position of the windows for a workbook, removing a shared workbook from shared use, or turning off the change history. For a list of all workbook elements you can protect, click  .

·      You can limit who can open and use the data in a workbook by requiring a password to open or save the workbook. You can also recommend that others open the workbook as read-only.
·      To hide an entire workbook so that users can't see it but can gain access to its contents, use the Hide command on the Window menu, and then save the changes to the hidden workbook.

What do you want to do?

Limit viewing and editing of an individual worksheet
Limit changes to an entire workbook
Limit access and changes to a shared workbook
Require a password to open or use data in a workbook
Require a password to edit and save a workbook
Recommend opening a workbook as read-only

Note   You can create additional restrictions for viewing or changing data in workbooks by writing macros in Visual Basic for Applications. For more information, see Visual Basic Editor Help.

If you need any further help please call...

Hope this helps

Frazer
0

Experts Exchange Solution brought to you by

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

###### It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Office

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.