IF statement with AND & OR criterias

DarkoDeign2

Board Regular
Joined
Jun 20, 2023
Messages
76
Office Version
  1. 365
Platform
  1. Windows
Hi,
I have an issue with this formula and I can't get it to work, what is wrong? Tried searching but couldn't get anything to help me solve this.

=IF(OR(Y2="Stop", AND(V2=0, Y2="Start"), V2+7, ))

I have the above formula in Column "X"
In Column "V" I have dates, or the cell could be blank
In Column "Y" I could have the text "Stop", "Start" or the cell could be blank

If V2 is blank, then ""
If Y2 contains the word stop, then ""
If Y2 contains the word start, then ""
If V2 contains a date, then V2+7 in cell X2
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
Sorry the formula is:

=IF(OR(Y2="Stop", AND(V2=0, Y2="Start"), V2+7, "" ))
 
Upvote 0
If V2 is blank, then ""
If Y2 contains the word stop, then ""
If Y2 contains the word start, then ""
If V2 contains a date, then V2+7 in cell X2
Which conditions do you want to take precedence, the 2 conditions in cell V2 or the 2 conditions in cell Y2?
 
Upvote 0
Experiment with this & see if it gives you what you want:
Book1
VWXY
1
2 
3
Sheet1
Cell Formulas
RangeFormula
X2X2=IF(OR(Y2="stop",Y2="start"),"",IF(V2="","",V2+7))
 
Upvote 0
I just thought of simplifying the formula.
What if the criterias are:

If V2 contains a date and Y2 is blank, then add V2+7 in cell X2

How would that formula look like?
 
Upvote 0

Forum statistics

Threads
1,224,889
Messages
6,181,605
Members
453,055
Latest member
cope7895

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