ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Specify Maximum Value (https://www.excelbanter.com/excel-discussion-misc-queries/14665-specify-maximum-value.html)

jcliquidtension

Specify Maximum Value
 
Hi,

Is there a way to call for a maximum value, but for that value not to exceed
X? For example, MAX(A:A) where the largest value is 7200, but I would
specify that if the MAX value is over 7000, return 7000.

I could use a logical statement, but I was wondering if there was a
worksheet function that did it all in one without having to type out the
logic. (Don't mean to be lazy, but I have LOTS of them to do.)

Thanks in advance,
Jason

Bernard Liengme

MIN(MAX(A:A),7000)


--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email

"jcliquidtension" wrote in
message ...
Hi,

Is there a way to call for a maximum value, but for that value not to
exceed
X? For example, MAX(A:A) where the largest value is 7200, but I would
specify that if the MAX value is over 7000, return 7000.

I could use a logical statement, but I was wondering if there was a
worksheet function that did it all in one without having to type out the
logic. (Don't mean to be lazy, but I have LOTS of them to do.)

Thanks in advance,
Jason




jcliquidtension

Wow!! That's awesome!! I had never thought of that! I guess that's sort of
like with logic, there's only 3 statements, right? Anyway, thanks for the
help!

"Bernard Liengme" wrote:

MIN(MAX(A:A),7000)


--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email

"jcliquidtension" wrote in
message ...
Hi,

Is there a way to call for a maximum value, but for that value not to
exceed
X? For example, MAX(A:A) where the largest value is 7200, but I would
specify that if the MAX value is over 7000, return 7000.

I could use a logical statement, but I was wondering if there was a
worksheet function that did it all in one without having to type out the
logic. (Don't mean to be lazy, but I have LOTS of them to do.)

Thanks in advance,
Jason






All times are GMT +1. The time now is 12:43 PM.

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