IF statements-pretty simple?

Toddcan

New Member
Joined
Apr 14, 2002
Messages
11
I tried to enter the following:
=if(a1<a2<a3,5,1)

But, no matter what my values in A1 and A3 are, I always get returned value of 1.

In words, I want to do this..
If the value in cell A1 is less than the value in A2, and the value in A2 is less than the value in A3, then return a 5, otherwise, return a 1.

What am I doing wrong?
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
On 2002-04-17 12:33, Toddcan wrote:
sorry.. .html was on /board/images/smiles/icon_smile.gif

here is my formula..

=if(a1<a2<a3,5,1)

"a1<a2<a3" isn't a valid logical test. Consider using...

=IF(AND(A1<A2,A2<A3),5,1)
 
Upvote 0

Forum statistics

Threads
1,214,643
Messages
6,120,702
Members
448,980
Latest member
CarlosWin

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top