Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel - Entering Fixed Decimal Places in Ranges

Status
Not open for further replies.

AllanB1

Programmer
Dec 30, 2002
201
US
I know it's possible to accomplish entering decimals without having to hit the decimal point through Tools>Options>Edit>Fixed Decimal Places.

Is there a way to limit this ability to particular ranges and not the entire sheet?

Thanks.
 
Not as far as I know - this would be workbook specific

Rgds, Geoff

We could learn a lot from crayons. Some are sharp, some are pretty and some are dull. Some have weird names and all are different colours but they all live in the same box.

Please read FAQ222-2244 before you ask a question
 
You would have to change the settings whenever the user selects a cell in that area. Have a look at the Worksheet_SelectionChange event. ( remember that you'd also have to code for settings things back to normal whenever a cell outside that area is selected )

Cheers, Glenn.

Beauty is in the eye of the beerholder.
 

AllanB1,

The only way I can think of is ugly and cumbersome.

Create a column for data entry (Col. A, for example). In column B, enter =A1/100 with a fixed 2-decimal format (or A1/1000 for 3 decimals, etc...)

User enters 1050 in A1, gets 10.50 in B1 if fixed for 2 decimal.

Like I said, it's clumsy.

Good luck.
GS

[small][navy]**********************^*********************
I always know where people are going to sit. I'm chairvoyant.[/navy][/small]
 
Thanks for your responses. There's obviously nothing "transparent", as I had thought.

I'm surprised there wouldn't be this Excel capability. There have to be numerous applications such as mine where there is a need for data entry of various number formats on the same worksheet, including only one section that requires a .### format. Not having to hit the decimal point on these hundreds of entries would be great.

Al
 

hi,

This feature is NOT a format.

A format does not CHANGE anything, except what is displayed. The underlying data is UNCHANGED.

This feature CHANGES the data. You must use this feature VERY CAREFULLY. If you turn on the built-in Tools > Options - EDIT Tab: Fixed decimal places which is obviously for the entire workbook, each time you EDIT a numeric value, it divides by 10^(the number your selected), [red]CHANGING THE VALUE!!!!!!![/red]



Skip,
[glasses]Don't let the Diatribe...
talk you to death![tongue]

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
A much more worrying issue, when entering huge lists by hand, is what you're going to do about error-checking... Unfortunately Excel lacks an =iswhatiintendedtotype() function.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top