Need help in Or/And function in creating report

G

Guest

Hello,

I am trying to create a report that calculate certain fields and add up the
total.
For example: in a Text Box field I have,
=Sum(IIf([Stage]<>3,[Time],0))
This is to say calculate the sum of time in all stages except stage 3. (3 is
one of 9 stages under StageID key field)

I would like to create the same expression, except to exclude time in stage
1 to 5.
How do I put in in expression form? I tried And or Or function, but have not
luck.

Any help is appreciated.
 
G

Guest

Try this

=Sum(IIf([Stage] not in(1,2,3,4,5),[Time],0))

Or
=Sum(IIf([Stage]>0 And [Stage] < 6,[Time],0))
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top