Calculated Field Access IIF Statement

mrmmickle1

Well-known Member
Joined
May 11, 2012
Messages
2,461
I have 4 Yes/No fields in Access.

[Built], [Sent], [Received], and [Processed] ----> I want to created a calculated field that marks them "COMPLETED" when a record has all 4 fields = TRUE.


Where am I going wrong?

Code:
IIF(IIf([Built]=True,1,IIf([Sent]=True,2,IIf([Received]=True,3,IIf([Processed]=True,4))))=4,"COMPLETED","NOT COMPLETED")
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
Yes/No fields really are just boolean (True/False) fields.
If you remember the rules of logic, AND statement are only true when every single condition is true (so only when all 4 fields in our statement are true).

So just write your equation like this:
Code:
Check: IIf([Built] And [Sent] And [Received] And [Processed],"COMPLETED","NOT COMPLETED")
 
Upvote 0

Forum statistics

Threads
1,221,876
Messages
6,162,567
Members
451,775
Latest member
Aiden Jenner

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