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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Formulas 1

Status
Not open for further replies.

sofiavba

Programmer
Apr 4, 2006
19
US
Can anyone tell me if it is possible to have two different types of formats on one cell? For example if I enter 100%, do a percent formula and if I enter 100 I do an integer value formula.
 


Hi,

You are not referring to FORMULAE, but rather to FORMATTING.

Once you enter a value as a percent ie 75%, Excel expects that every other value that you enter will be a percent.

Skip,

[glasses] [red]Be Advised![/red] A chicken, who would drag a wagon across the road for 2 cents, is…
POULTRY in motion to PULLET for a PALTRY amount! [tongue]
 
As SkipVought points out, Excel tries to be intuitive. It will retain the format of the first cell it "senses" which needs an applied format. To combat this, I generally recommend the keyboard shortcuts.

Ctrl + Shift + ~ = General
Ctrl + Shift + 1 = Number
Ctrl + Shift + 2 = Time
Ctrl + Shift + 3 = Date
Ctrl + Shift + 4 = Currency
Ctrl + Shift + 5 = Percent
Ctrl + Shift + 6 = Exponent

So I would just hit Ctrl + Shift + ~ or 1 to return to General/Number format.

HTH

-----------
Regards,
Zack Barresse
 


Learn sumthin' new every day!

Thanx Zack ==> *

Skip,

[glasses] [red]Be Advised![/red] A chicken, who would drag a wagon across the road for 2 cents, is…
POULTRY in motion to PULLET for a PALTRY amount! [tongue]
 
you could do it via the change event in code but it seems to me it would be more hassle than its worth.

On a seperate note, I cannot think of a good reason to have different number types in the same cell....I would recommend not doing so to be honest as it infers to me that there is a fundamental issue with the spreadsheet design

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
 


Ditto Geoff!

Skip,

[glasses] [red]Be Advised![/red] A chicken, who would drag a wagon across the road for 2 cents, is…
POULTRY in motion to PULLET for a PALTRY amount! [tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top