nested if statement for text search

mecerrato

Board Regular
Joined
Oct 5, 2015
Messages
184
Office Version
  1. 365
Platform
  1. Windows
I have this if statement that calculates a due date for me, it works fine but I now have a new situation that created the need to modify to exclude the calculation if column E contains the work "Broker".
=IF(K21<>"","N/A",IFERROR(WORKDAY.INTL(N21,-3,11,Holidays!$D$5:$D$26),""))

Here is what I have tried but it gives me an error, what am I oding wrong?
=IF(K21<>"",if(e21,"<>*brokered*"),"N/A",IFERROR(WORKDAY.INTL(N21,-3,11,Holidays!$D$5:$D$26),""))
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
Will "Broker" be on it's own in the cell, or part of a larger string?
 
Upvote 0
Ok, how about
Excel Formula:
=IF(AND(K21<>"",ISERROR(SEARCH("brokered",E21))),"N/A",IFERROR(WORKDAY.INTL(N21,-3,11,Holidays!$D$5:$D$26),""))
 
Upvote 0
Ok, how about
Excel Formula:
=IF(AND(K21<>"",ISERROR(SEARCH("brokered",E21))),"N/A",IFERROR(WORKDAY.INTL(N21,-3,11,Holidays!$D$5:$D$26),""))
Thank you Fluff but that did not work, also I think I should be using OR instead of AND because I want the "N/A" to show if either of those criteria exist. The formula you provided did not result in an N/A as it should based on the work BROKERED existing in E21.
 
Upvote 0
Should you have NA if E21 contains brokered, or like your formula if it does not contain brokered?
 
Upvote 0
Should you have NA if E21 contains brokered, or like your formula if it does not contain brokered?
if column E21 contains the string BROKERED OR if K21 is NOT blank then the result should be N/A, else the date calculation should occur.
 
Upvote 0
Thank you Fluff but that did not work, also I think I should be using OR instead of AND because I want the "N/A" to show if either of those criteria exist. The formula you provided did not result in an N/A as it should based on the work BROKERED existing in E21.
Did you try changing the "AND" to an "OR" and see if it does what you want?
 
Upvote 0
In that case try
Excel Formula:
=IF(OR(K21<>"",ISNUMBER(SEARCH("brokered",E21))),"N/A",IFERROR(WORKDAY.INTL(N21,-3,11,Holidays!$D$5:$D$26),""))
 
Upvote 0
Solution
In that case try
Excel Formula:
=IF(OR(K21<>"",ISNUMBER(SEARCH("brokered",E21))),"N/A",IFERROR(WORKDAY.INTL(N21,-3,11,Holidays!$D$5:$D$26),""))
Thank you Fluff, I would have never been able to get that formula right, I appreciate your time in resolving.
 
Upvote 0

Forum statistics

Threads
1,223,952
Messages
6,175,596
Members
452,658
Latest member
GStorm

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