Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Determining the Minimum of Three Numbers

Status
Not open for further replies.

CWEngineer

Civil/Environmental
Jul 3, 2002
269
I have three numbers in cells H28, H29 and H30. I am trying to find the minimum of those three numbers. I tried doing the formula below but it does not seem to work. After talking to a co-worker he brought up the MIN function. That also works, but I guess right now I am trying to figuere out why the function below is not working. Appreciate if your help. THANKS.

=IF((H28<H29)^(H28<H30),H28,IF(H29<H30,H29,H30))
 
Replies continue below

Recommended for you

I'm not sure what you're trying to do with ^

The following will work to give the min of the three cells (assuming none are equal and you don't want to use min)
=+IF(H28<H29,IF(H28<H30,H28,H30),IF(H29<H30,H29,H30))

=====================================
Eng-tips forums: The best place on the web for engineering discussions.
 
One possible result of your test is 0^0. That is somewhat undefined. There was a discussion in the mechanical engineering other topics forum.

=====================================
Eng-tips forums: The best place on the web for engineering discussions.
 
You should NEVER use Booleans in arithmetic expressions.

TTFN



 
I was trying to use the AND statement by using ^. I have used this in mathcad, but I guess it does not work in excel, or is there another way I can use AND statement within and IF statement?

THANKS
 
The more structured way would be
=IF(AND((H28<H29),(H28<H30)),H28,IF(H29<H30,H29,H30))

Under peril of incurring uppercase wrath of other posters, I will mention (but not recommend) that you can also use "*" to accomplish boolena "and":
=IF(AND((H28<H29)*(H28<H30)),H28,IF(H29<H30,H29,H30))


=====================================
Eng-tips forums: The best place on the web for engineering discussions.
 
Whoops. My last example had a * and an "and". I meant:
=IF((H28<H29)*(H28<H30),H28,IF(H29<H30,H29,H30))

=====================================
Eng-tips forums: The best place on the web for engineering discussions.
 
"^" in Excel is an exponent, not an "and".

Hg

Eng-Tips policies: faq731-376
 
gman1, HgTX got it right.

"^" is an exponent (raised to the power of).

"Do not worry about your problems with mathematics, I assure you mine are far greater."
Albert Einstein
Have you read FAQ731-376 to make the best use of Eng-Tips Forums?
 
THANKS, you guys have been very helpfull.

gman1
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor