Conditional formating

  • Thread starter Stephen Robinson
  • Start date
S

Stephen Robinson

Hi,

I've worked out how to do conditional formating when "x<y
go red" but how do you get "if x<y then display y"

We are having a problem with stats going over 100% so what
I want is that if it calulates over 100% then to only
display 100% and not the correct figure.

Thanks
Stephen
 
W

William

Stephen

I assume you have a row of numbers, say B1:J1, that should total 100% when
aggregated but you are encountering rounding differences when the total is
calculated in, say, cell K1

If its just a presentation issue, then select the Column K, select
"Format>Cells>Number>Custom" from the Excel toolbar and enter the following
custom number format in the "Type" box:
[<1]0.00%;"100.00%"

--
XL2002
Regards

William
(e-mail address removed)

| Hi,
|
| I've worked out how to do conditional formating when "x<y
| go red" but how do you get "if x<y then display y"
|
| We are having a problem with stats going over 100% so what
| I want is that if it calulates over 100% then to only
| display 100% and not the correct figure.
|
| Thanks
| Stephen
 
B

Bob Phillips

Stephen,

Conditional formatting can only manipulate the format, not the value.

For this, you need to accommodate date it in the formula, for instance

=IF(myformula>100%,100%,myFormula)

or

=MIN(100%,myFormula)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top