Count of 1 (1 Viewer)

Learn2010

Registered User.
Local time
Today, 07:10
Joined
Sep 15, 2010
Messages
415
I have a report that has a subgroup for each state with a Header and a Footer for each. In the Footer, I count the number of entities in each state and display that.

START of CODE

=Count([ProgramName]) & " Program(s) in " & [State]

END OF CODE

I have included the parentheses around the s in Programs in case there is only one entity. Here is what I would like to happen.

If there is only one entity, display:

=Count([ProgramName]) & " Program in " & [State]

If there is more than one, display

=Count([ProgramName]) & " Programs in " & [State]

Is there a way to accomplish this?

Thank you.
 

plog

Banishment Pending
Local time
Today, 06:10
Joined
May 11, 2011
Messages
11,638
Use an Iif statement:

=COUNT() & " Program" & Iif(Count()>1, "s") & " in " & [State]
 

Learn2010

Registered User.
Local time
Today, 07:10
Joined
Sep 15, 2010
Messages
415
This worked great. Thank you.
 

Users who are viewing this thread

Top Bottom