How to limit an percent to 100%?


Posted by Brad Rodriguez on December 19, 2000 7:14 AM

I need to put a formula in a cell to make it limited to 100%. I can't use a macro though. It needs to be inline. This is the current formula:
=(E1/C1)

But I want to make it so if C1 equals 1 and E1 equals 2 that it will say 100%. But if E1 equals anything less than 1 it will give the proper percentage. Please advise.

Thanks
Brad

Posted by Aladin Akyurek on December 19, 2000 7:47 AM

Try

=if(and(c1=1,e1=2),100%,if(e1<1,e1/c1,"Error"))

although I don't understand what you're to.

Apply Percent Style to the cell where the above formula goes.

Aladin

Posted by Tim Francis-Wright on December 19, 2000 8:20 AM

The following should work:
=MIN(100%,E1/C1)


Posted by Aladin Akyurel on December 19, 2000 9:08 AM

: I need to put a formula in a cell to make it limited to 100%. I can't use a macro though. It needs to be inline. This is the current formula: : =(E1/C1) : Brad

Now, I understand. You read "But if E1 equals anything less than 1" the way it should be.

Aladin



Posted by Brad on December 19, 2000 11:57 AM

Perfect! Thanks

: I need to put a formula in a cell to make it limited to 100%. I can't use a macro though. It needs to be inline. This is the current formula: : =(E1/C1) : Brad