Conditional Formatting with IIF IS NULL

IH8XEL

New Member
Joined
Jun 26, 2015
Messages
10
Hey guys. I'm trying to conditionally format a date field in a report. If the field in the record Is Null I want to return "No" if Not Null I want to return "Yes." Here is what I have so far:

IIf([fldName] Is Null,"No","Yes")

Doesn't work though; either shows the actual entry or a blank space, not "Yes/No"

Help?!?!?!??!?!?!?!?!?
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
Conditional formatting is used to change the formatting properties (i.e. fill color, text color, bold, etc) of a field. It does NOT return a value. That would be a calculated field, not conditional formatting.

A calculated field on your report (or in the underlying query) would look like:
Code:
[COLOR=#333333]IIf(IsNull([fldName]),"Yes","No")[/COLOR]

For conditional formatting, you would simply use:
Code:
IsNull([fldName])
which returns True or False (Conditional Formatting is applied when condition is True)
 
Upvote 0

Forum statistics

Threads
1,223,237
Messages
6,170,924
Members
452,366
Latest member
TePunaBloke

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