ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   If Formula - Help (https://www.excelbanter.com/excel-programming/437478-if-formula-help.html)

Carrie

If Formula - Help
 
I'm not sure if I'm using the right formula but this is what I need:

I need the the total of b4/b5, if that equals 160 or more I need it to show
160, if it's 159 or less I need that value to show.

Thanks

Mike H

If Formula - Help
 
Carrie,

=MIN(B4/B5,160)

Mike

"Carrie" wrote:

I'm not sure if I'm using the right formula but this is what I need:

I need the the total of b4/b5, if that equals 160 or more I need it to show
160, if it's 159 or less I need that value to show.

Thanks


Joe User[_2_]

If Formula - Help
 
"Carrie" wrote:
I'm not sure if I'm using the right formula but this is what I need:
I need the the total of b4/b5, if that equals 160 or more I need
it to show 160, if it's 159 or less I need that value to show.


Ostensibly:

=min(160, B4/B5)

But not that B4/B5 might not always be an integral value (158, 159, 160,
etc). So I wonder if you mean: if B4/B5 would __appear__ as 159 or less
when displayed in a cell formatted with zero decimal places.

In that case, you might want:

=min(160, round(B4/B5,0))

So if B4/B5 were 159.5 or larger, the result would be 160.


J_Knowles

If Formula - Help
 
If you want to use an If statement:

=IF(B4/B5=160,160,round(B4/B5,0))

--
Data Hog


"Carrie" wrote:

I'm not sure if I'm using the right formula but this is what I need:

I need the the total of b4/b5, if that equals 160 or more I need it to show
160, if it's 159 or less I need that value to show.

Thanks



All times are GMT +1. The time now is 06:49 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com