Could you write function for the following scenario?

dener123

New Member
Joined
Jul 10, 2024
Messages
18
Office Version
  1. 2021
Cell ACell BCell CCell DCell E
Row 122.22.5(Need function for this cell)
Row 22.11.52.3
Row 3


I need a single function for the scenario:
If ALL values in Cell B, C, D in Row 1 are all Above or equal to 2, show "Yes" in Cell E, Row 1)
If At least 1 value in Cell B, C, D in Row 1 is below 2, show "No" in Cell E, Row 1)
If At least 1 value in Cell B, C, D in Row 1 is blank, show "No" in Cell E, Row 1)
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
Would this work for you:

Excel Formula:
=IFS(AND(B2:D2>=2),"Yes",OR(B3:D3<2,ISBLANK(B3:D3)),"No")
 
Upvote 0
Another option
Excel Formula:
=IF(COUNTIFS(B2:D2,">=2")=3,"Yes","No")
 
Upvote 0
Excel Formula:
=IF(AND(B2>=2,C2>=2,D2>=2),"Yes",IF(OR(B2<2,C2<2,D2<2,B2="",C2="",D2=""),"No",""))
 
Upvote 0
Would this work for you:

Excel Formula:
=IFS(AND(B2:D2>=2),"Yes",OR(B3:D3<2,ISBLANK(B3:D3)),"No")
Thank you! This works.
Could you do 1 more?

it's same scenario but one is changed.
Scenario:

If ALL values in Cell B, C, D in Row 1 are all Above or equal to 2, show "Yes" in Cell E, Row 1)
If ALL value in Cell B, C, D in Row 1 is below 2, show "No" in Cell E, Row 1)
If At least 1 value in Cell B, C, D in Row 1 is blank, show "No" in Cell E, Row 1)
 
Upvote 0
Thank you! This works.
Could you do 1 more?

it's same scenario but one is changed.
Scenario:

If ALL values in Cell B, C, D in Row 1 are all Above or equal to 2, show "Yes" in Cell E, Row 1)
If ALL value in Cell B, C, D in Row 1 is below 2, show "No" in Cell E, Row 1)
If At least 1 value in Cell B, C, D in Row 1 is blank, show "No" in Cell E, Row 1)

That wouls be:

Excel Formula:
=IFS(AND(B2:D2>=2),"Yes",AND(B2:D2<2),"No",OR(ISBLANK(B2:D2)),"No")

But what happens when e.g. two columns are < 2 and one > 2?
 
Upvote 0
If ALL values in Cell B, C, D in Row 1 are all Above or equal to 2, show "Yes" in Cell E, Row 1)
If ALL value in Cell B, C, D in Row 1 is below 2, show "No" in Cell E, Row 1)
If At least 1 value in Cell B, C, D in Row 1 is blank, show "No" in Cell E, Row 1)
Not sure what should happen if 1 or 2 values are >=2 & the other(s) are <2, but as you still want No if all 3 are are not >= 2 you can still use the formula in post#3.
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,284
Members
452,630
Latest member
OdubiYouth

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