Formula Help IF AND OR i think?

slinky192001

Board Regular
Joined
Mar 16, 2007
Messages
100
Hello

I have some fields in a spreadsheet:

I2 - Numbers
BT2 - Names
AX2 - Names
CV2 - Numbers (Seconds)

I have written a formula to say that if the number in I2 is less than 1 and the names in BT2 and AX2 are the same and the CV2 is less than 3601 then Yes otherwise No which looks like this:

=IF((AND(I2<1,BT2=AX2,CV2<3601)),"Yes","No")

I need to change this to say that the names in BT2 and AX2 can be the same or the name in BT2 can be one of the following 2 names:

Paul Fisher
Darren Smith
Paul Turner

So keeping all criteria in the original formula i need to add a bit that says or if the names in BT2 are one of the above then Yes.

Hope this is making sense.

Thanks for any help
 

Some videos you may like

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.

jasonb75

Well-known Member
Joined
Dec 30, 2008
Messages
10,877
Office Version
  1. 2019
Platform
  1. Windows
Try

=IF((AND(I2<1,OR(BT2=AX2,ISNUMBER(MATCH(BT2,{"Paul Fisher","Darren Smith","Paul Turner"},0))),CV2<3601)),"Yes","No")
 

MrKowz

Well-known Member
Joined
Jun 30, 2008
Messages
6,653
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
Try:

<table width="85%" cellpadding="2.5px" rules="all" style=";border: 2px solid black;border-collapse:collapse;padding: 0.4em;background-color: #FFFFFF" ><tr><td style="padding:6px" ><b>Worksheet Formulas</b><table cellpadding="2.5px" width="100%" rules="all" style="border: 1px solid;text-align:center;background-color: #FFFFFF;border-collapse: collapse; border-color: #A6AAB6"><thead><tr style=" background-color: #E0E0F0;color: #161120"><th width="10px">Cell</th><th style="text-align:left;padding-left:5px;">Formula</th></tr></thead><tbody><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120"></th><td style="text-align:left">=IF(<font color="Blue">AND(<font color="Red">I2<1,OR(<font color="Green">BT2=AX2,BT2={"Paul Fisher","Darren Smith","Paul Turner"}</font>),CV2<3601</font>),"Yes","No"</font>) </td></tr></tbody></table></td></tr></table><br />
 

slinky192001

Board Regular
Joined
Mar 16, 2007
Messages
100
Try:

<table width="85%" cellpadding="2.5px" rules="all" style=";border: 2px solid black;border-collapse:collapse;padding: 0.4em;background-color: #FFFFFF" ><tr><td style="padding:6px" ><b>Worksheet Formulas</b><table cellpadding="2.5px" width="100%" rules="all" style="border: 1px solid;text-align:center;background-color: #FFFFFF;border-collapse: collapse; border-color: #A6AAB6"><thead><tr style=" background-color: #E0E0F0;color: #161120"><th width="10px">Cell</th><th style="text-align:left;padding-left:5px;">Formula</th></tr></thead><tbody><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120"></th><td style="text-align:left">=IF(<font color="Blue">AND(<font color="Red">I2<1,OR(<font color="Green">BT2=AX2,BT2={"Paul Fisher","Darren Smith","Paul Turner"}</font>),CV2<3601</font>),"Yes","No"</font>) </td></tr></tbody></table></td></tr></table><br />


This one doesnt work.... if the name is the same it says no when it should say yes.
 

jasonb75

Well-known Member
Joined
Dec 30, 2008
Messages
10,877
Office Version
  1. 2019
Platform
  1. Windows
Try:

<TABLE style="BORDER-BOTTOM: black 2px solid; BORDER-LEFT: black 2px solid; PADDING-BOTTOM: 0.4em; BACKGROUND-COLOR: #ffffff; PADDING-LEFT: 0.4em; PADDING-RIGHT: 0.4em; BORDER-COLLAPSE: collapse; BORDER-TOP: black 2px solid; BORDER-RIGHT: black 2px solid; PADDING-TOP: 0.4em" rules=all cellPadding=2 width="85%"><TBODY><TR><TD style="PADDING-BOTTOM: 6px; PADDING-LEFT: 6px; PADDING-RIGHT: 6px; PADDING-TOP: 6px">Worksheet Formulas<TABLE style="BORDER-BOTTOM: #a6aab6 1px solid; TEXT-ALIGN: center; BORDER-LEFT: #a6aab6 1px solid; BACKGROUND-COLOR: #ffffff; BORDER-COLLAPSE: collapse; BORDER-TOP: #a6aab6 1px solid; BORDER-RIGHT: #a6aab6 1px solid" rules=all cellPadding=2 width="100%"><THEAD><TR style="BACKGROUND-COLOR: #e0e0f0; COLOR: #161120"><TH width=10>Cell</TH><TH style="TEXT-ALIGN: left; PADDING-LEFT: 5px">Formula</TH></TR></THEAD><TBODY><TR><TH style="BACKGROUND-COLOR: #e0e0f0; COLOR: #161120" width=10></TH><TD style="TEXT-ALIGN: left">=IF(AND(I2<1,OR(BT2=AX2,BT2={"Paul Fisher","Darren Smith","Paul Turner"}),CV2<3601),"Yes","No") </TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>

Works fine for me.
 

Watch MrExcel Video

Forum statistics

Threads
1,109,425
Messages
5,528,687
Members
409,830
Latest member
KT50

This Week's Hot Topics

  • Change military grades into rank
    Afternoon all Need help with formula that will change military rank (i.e. 1, 2, 3 into Amn, A1C, SrA). Running IF formula that does not work...
  • VBA COUNTIF SOLUTION
    Hi The following are the errors spread across the several columns from E to Q ie. 13 columns across several sheets with more than 500 rows per...
  • INSERT ROW WITH SPECIFIS TEXT IN A COLUMN
    Hi All! How can identify that that the row to be inserted has to be inserted before 1st row with specific text in column F. If I record the...
  • Auto-Create a monthly Sign in sheet for preschool students
    The image below is what each page looks like. Above is space for the "Child Name" "Month" "Class" School days are obviously Monday-Friday but...
  • VBA vlookup multiple results
    Hi folks, Hopefully someone out there can help. I have a list to vlookup which works (ish). the lookup only picks up the first instance of the...
  • Extract values for earliest/latest times
    I am trying to put together a formula to get the earliest start time, the latest end time from column A for each person in Column B-F without the...
Top