Adding an "AND" condition to a formula

easybpw

Active Member
Joined
Sep 30, 2003
Messages
439
Office Version
  1. 365
  2. 2013
Platform
  1. Windows
Hello and thanks in advance for your help. I'm using the formula below without issue but now need to add an "AND" condition to the formula. Struggling to get it right. Any help is appreciated. Note that I'm adding the 2nd half of the bolded section. Without the 2nd piece the formula works fine but now I need to also eliminate anything in the transaction narrative column that contains "AXP". So if "transaction amount" is less than 15000 AND transaction narrative does not include "AXP". Just realized that the formula also cannot contain "chgbck" in the narrative. So it needs to be less than 15000 and narrative cannot have "AXP" or chgbck" in it. And the formula is referencing a table. Using Office 365.

=IF(OR(ISNUMBER(SEARCH("AMERICAN",$G4)))=TRUE,IF([@[Transaction Amount]]<15000,IF([@[Transaction narrative]]<>"AXP","Amex Phone",""),))
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
If I am not mistaken, you could simplify the formula a bit. This seems to do the same thing, see if it works:

Excel Formula:
=IF(AND(ISNUMBER(SEARCH("AMERICAN",$G4))=TRUE,Table1[@[Transaction Amount]]<15000,Table1[@[Transaction Narrative]]<>"AXP",Table1[@[Transaction Narrative]]<>"chgbck"),"Amex Phone","")
 
Upvote 0

Forum statistics

Threads
1,223,901
Messages
6,175,277
Members
452,629
Latest member
SahilPolekar

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