Count of 1

Learn2010

Registered User.
Local time
Today, 13:48
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.
 
Use an Iif statement:

=COUNT() & " Program" & Iif(Count()>1, "s") & " in " & [State]
 
This worked great. Thank you.
 

Users who are viewing this thread

Back
Top Bottom