If and formula

apgmin

Board Regular
Joined
Mar 1, 2010
Messages
150
Office Version
  1. 2013
Platform
  1. Windows
What should be the formula for the following:

If cell a1 is not empty then

check cell b1, c1 and d1

only if all the above 3 cells b1, c1 and d1 are "yes"

then the result should be "ok"

If any of the above 3 cells b1, c1 and d1 are empty or anything other than yes then the result should be "rejected"
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
This will work:

=IF(AND(A1<>"",COUNTIF(B1:D1,"yes")=3),"ok","rejected")
 
Upvote 0
Sir, only if the cell a1 is not empty should the results come or else it should be blank
 
Upvote 0
Steve's solution is correct based on your description of the problem.

So just change "rejected" to "" in Steve's solution

Simple.
 
Last edited:
Upvote 0
Now can you please help with the following in addition to the above

cells e1 to j1 should not be empty if any of these cells are empty then also the message should be rejected
 
Upvote 0
=IF(A1="","",IF(OR(COUNTIF(B1:D1,"yes")<>3,COUNTIF(E1:J1,"")),"rejected","ok"))
 
Upvote 0

Forum statistics

Threads
1,223,889
Messages
6,175,223
Members
452,620
Latest member
dsubash

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