IF greater than (3 cells)

gomes123

New Member
Joined
Jun 16, 2021
Messages
19
Office Version
  1. 2007
Platform
  1. Windows
I have cells in A1, B1, C1 with values 10,20,30 respectively.

If Cell C1>B1>A1, I would like it to display the text YES, if not, NO.

My formula is =IF(AND(B1>A1,C1>B1),"YES","NO")

Is this the most efficient way to write the formula?

Is there a way to write it in 1 line, such as =IF(C1>B1>A1,"YES","NO"), but that doesnt seem to work?

Thanks.
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
My formula is =IF(AND(B1>A1,C1>B1),"YES","NO")

Is this the most efficient way to write the formula?
That is how I would write it.

Is there a way to write it in 1 line, such as =IF(C1>B1>A1,"YES","NO"), but that doesnt seem to work?
No, you cannot do it that way in Excel. It wants each each comparison checked independently.
 
Upvote 1
Solution
I would stick with
Excel Formula:
=IF(AND(B1>A1,C1>B1),"YES","NO")
 
Upvote 1

Forum statistics

Threads
1,215,575
Messages
6,125,628
Members
449,241
Latest member
NoniJ

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