show/do not show text box if field is null

eric.l.bohon

Board Regular
Joined
May 8, 2006
Messages
149
alcon,

can not seem to remember how to do this. I have a text box in a report with the following expression:

="a. " & nz([a],nz(,nz([c])
="c. " & nz([a],nz(,nz([c])
="d. " & nz([a],nz(,nz([c])

and so on and so on.

is there a way that if the field c is blank that nothing shows up instead of just c showing up and nothing else.
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
both of those recommendations did not work.

I even tried multiple things and still did not work. the one that did not have anything selected for it still showed up with just the letter and nothing else.
 
Upvote 0
What about one of these:

Code:
="a. " + [a]

or

Code:
=IIF( IsNull([a]) ,Null, "a. " & [a],)

or

Code:
=IIF( IsNull([a]) ,"", "a. " & [a],)
 
Upvote 0
is there a way that if the field c is blank that nothing shows up instead of just c showing up and nothing else.

So what if fields c and b are both Null. Or c and a but not b? Or a and b but not c? This is very cryptic. In any case, you cannot have nothing showing up with three fields being concatenated, unless all three are Null/Blank.
 
Upvote 0

Forum statistics

Threads
1,224,595
Messages
6,179,799
Members
452,943
Latest member
Newbie4296

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