Skip to content

Excel Functions

Excel f(x)s = Excel Functions

  • IFS (and IFNA) to avoid nested IFs Formulas - combined functions
  • Blank (isempty) VS “” (null string) Excel User tips
  • Week number to Month number DATE
  • Unix DateTime Number Basic Math
  • Always get 1st name (or last) Formulas - combined functions
  • The Excel “&” bug Excel User tips
  • VLookup Lookup and References
  • Text-to-Columns, dynamically using formulas IFERROR

IF with AND and IF with OR

Posted on December 25, 2017 By ANmar

The powerful function If can already do a lot of tricks, but we can for sure do more when we use it with AND or OR functions.

Also, once we understand that, we can use the power of combining AND and OR inside the Logical test of IF, to make it even smarter

Once good example is when we need to see if a certain date is within the same month as this month like below…

If you use simple IF with MONTH (one condition)…

=IF(Month(F2)=Month(Today()),"This Month","")

You will get “This Month” even if it was not same year

Which we do not want for sure

 

So, we can use AND function to make sure both conditions are met at the same time, at that time only, the test will get a TRUE output

=IF(AND(MONTH(D5)=MONTH(TODAY()),YEAR(D5)=YEAR(TODAY())),"This month","No")

 

AND() function can combine 256 conditions, if all TRUE, it will return a TRUE, while OR() only one of these conditions may return TRUE to result in TRUE

Let me know if that helped in anyway, or not

AND, Formulas - combined functions, IF, Logical, OR, Standard functions

Post navigation

Previous Post: New function IFERROR, finally
Next Post: Get monthly total from table with dates

Related Posts

  • VLookup Lookup and References
  • Expenses calendar, FaCal Basic Math
  • Return 12 values in one number AND
  • Links between two workbooks – dynamically using functions INDIRECT
  • Convert 2-column into wide (column-row) table Formulas - combined functions
  • Workdays – Across months DATE

Recent Posts

  • Stale values (Scratched functions)
  • Middle name + 1st name
  • LastSunday, LastSaturday
  • Paste Special Percentage
  • Jan8 date format

Archives

Categories

  • Array formula (1)
  • Formulas – combined functions (58)
  • Google Sheets (2)
  • Non-functions (36)
    • ActiveX controls (2)
    • Conditional Formatting (7)
    • Data Validation (7)
    • Excel User tips (19)
    • Format Cells (6)
    • Graphics (4)
    • Names (3)
  • Standard functions (82)
    • Basic Math (18)
    • Date and Time (16)
      • DATE (9)
      • Hour (1)
      • MONTH (7)
      • NETWORKDAYS (2)
      • TODAY (7)
      • WEEKDAY (8)
      • WEEKNUM (1)
      • YEAR (8)
    • Engineering (1)
      • CONVERT (1)
    • Information (6)
      • CELL (4)
      • ISERROR (1)
      • N (1)
    • Logical (30)
      • AND (5)
      • IF (24)
      • IFERROR (6)
      • IFNA (1)
      • IFS (1)
      • ISERROR (1)
      • OR (2)
    • Lookup and References (36)
      • ADDRESS (4)
      • CHOOSE (3)
      • COLUMN (7)
      • FORMULATEXT (1)
      • HLOOKUP (1)
      • HYPERLINK (2)
      • INDEX (5)
      • INDIRECT (6)
      • MATCH (12)
      • OFFSET (15)
      • ROW (11)
      • VLOOKUP (5)
    • Math and Trig (24)
      • ABS (1)
      • CEILING (1)
      • COUNT (1)
      • COUNTA (4)
      • INT (9)
      • LARGE (2)
      • MAX (1)
      • Min (2)
      • SMALL (3)
      • SUM (3)
      • SUMIF (1)
      • SUMIFS (2)
      • SUMPRODUCT (1)
    • Statistical (5)
      • COUNTIF (4)
      • COUNTIFS (1)
    • Texts and Strings (24)
      • CHAR (5)
      • CONCATINATE (1)
      • FIND (1)
      • LEFT (8)
      • Len (4)
      • MID (9)
      • REPT (3)
      • RIGHT (2)
      • SEARCH (9)
      • STRING (1)
      • SUBSTITUTE (2)
      • TEXT (4)
      • TRIM (2)
      • VALUE (2)
  • Uncategorized (2)
  • User-Defined f(x)s = UDF (3)
    • HyperlinkOf (1)
  • Worksheet (16)
  • XLfxs (2)

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org
  • Unix DateTime Number Basic Math
  • Excel ad from early 90s Non-functions
  • MATCH fumction, just a simple search Lookup and References
  • Return 12 values in one number AND
  • CTRL+Y a mini macro Excel User tips
  • Workdays – Across months DATE
  • Recover the unrecoverable Excel User tips
  • New function IFERROR, finally IFERROR

Copyright © 2025 Excel Functions.

Powered by PressBook News Dark theme