How to Convert an Excel IF and AND Formula to an Access Expression
Question details
The user needs to translate a logical Excel formula containing IF and AND functions into an equivalent Microsoft Access expression.
- Product
- Microsoft Access / Excel
- Device & OS
- not provided
- Scenario
- Converting logical formulas that contain blank date tests, time elapsed calculations, and numeric evaluations from an Excel spreadsheet into a Microsoft Access database.
- Observed behavior
- Excel uses standard IF and AND syntax, whereas Microsoft Access requires database-specific functions such as IIf, IsNull, IsNumeric, and Date() to achieve the exact same logic.
Ensure you have the exact references to the field names in your Access database, as syntax errors frequently occur due to misspelled or missing bracketed field names.
Use IIf and IsNull for Access Expressions
Apply Access-specific syntax by replacing Excel's IF and AND logic with equivalent IIf, IsNull, IsNumeric, and Date functions.
Unlike Excel, Microsoft Access relies on the IIf (Immediate If) function for conditional logic. Furthermore, when dealing with empty cells or validating data types, Access uses IsNull and IsNumeric instead of standard Excel checks.
Locate the exact field names in your Access table (e.g., [Docketed], [Arraignment], [707 Clock - Calculated], [Excl Del]).
Enter the converted expression into your query or text box: =IIf(IsNull([Docketed]) And (IsNull([Arraignment]) Or [Arraignment]-Date()>0), IIf(IsNumeric([707 Clock - Calculated]), [707 Clock - Calculated]-[Excl Del], "Not Started"), "Tolled")
Check your table design to confirm that the date and numeric fields referenced in your expression are using compatible Data/Time and Number data types.

Looking for a Lightweight Excel Alternative? Try WPS Office
While Microsoft Access requires complex syntax changes for database logic, you can handle most data management, complex conditional formulas (like IF and AND), and data analysis directly within WPS Spreadsheet. It is a free, lightweight, and highly compatible alternative to Microsoft Office.
- 1. Download and Install WPS Office: Visit the official WPS Office website and download the free software suite for your operating system.
- 2. Open Your Spreadsheets: Open your existing Excel files directly in WPS Spreadsheet; your IF and AND formulas will work flawlessly.
- 3. Manage Data Easily: Use built-in data filtering, pivot tables, and conditional formatting without needing a separate database software.

Frequently Asked Questions
What is the Microsoft Access equivalent of the Excel IF function?
In Microsoft Access, the equivalent of Excel's IF function is the IIf (Immediate If) function. It evaluates an expression and returns one specified value if true, and another if false.
How do I check for empty or blank cells in Access like I do in Excel?
Instead of checking for an empty string (="") or using the ISBLANK function as you would in Excel, Microsoft Access uses the IsNull() function to check if a database field contains no data.
Can I use standard Excel date math in Access expressions?
Access allows date math but requires specific functions like Date() instead of TODAY(). You can subtract the Date() function from a date field to calculate elapsed days, provided the field is formatted as a Date/Time data type.
Why am I getting a '#Name?' error when typing an expression in Access?
This error typically occurs if a field name is misspelled or missing brackets. Ensure all referenced fields exactly match your table schema and are strictly enclosed in square brackets, such as [Field Name].




