Help with if then statement

J

Joyce

I have a month end report that I need that reflects if
research cases are resolved within an established
turnaround time. All but two of my research case types
have a turn around time of 5 days so I actually calculate
using 7 to account for the 2 day weekend. I have two case
types that have a turnaround time of 2 days. I can use
the factor of 2 for cases received on Monday-Wed, however
I need to calculate using 4 for these case types received
on Thursday and Friday. Is there an "if/then" expression
or VBA code I could use to calcuate using 4 for dates that
fall on the specific Thursday and Friday dates. I've
never done an if,then expression or VB code for this. I
need something that will calculate this

If CaseType1 and CaseType4 received on 01/08/2004,
01/09/2004, 01/15/15, 01/16/2004, 01/22/04, 01/23/2004,
01/29/2003 01/30/04 Then TurnAround=4

Currently my report has 4 fields, they are:

Date Received: =Count([DateReceived])

Date Resolved: =Count([DateResolved])

Resolved within TurnAround time: =Count(IIf(DateDiff("d",
[DateReceived],[DateResolved])<=[TurnaroundDays],"Q"))

Percent Resolved within Turnaround Goal:=[txtQuick]/
[txtAccountsResolved]

Thank you for your help.
 
M

Marshall Barton

Joyce said:
I have a month end report that I need that reflects if
research cases are resolved within an established
turnaround time. All but two of my research case types
have a turn around time of 5 days so I actually calculate
using 7 to account for the 2 day weekend. I have two case
types that have a turnaround time of 2 days. I can use
the factor of 2 for cases received on Monday-Wed, however
I need to calculate using 4 for these case types received
on Thursday and Friday. Is there an "if/then" expression
or VBA code I could use to calcuate using 4 for dates that
fall on the specific Thursday and Friday dates. I've
never done an if,then expression or VB code for this. I
need something that will calculate this

If CaseType1 and CaseType4 received on 01/08/2004,
01/09/2004, 01/15/15, 01/16/2004, 01/22/04, 01/23/2004,
01/29/2003 01/30/04 Then TurnAround=4

Currently my report has 4 fields, they are:

Date Received: =Count([DateReceived])

Date Resolved: =Count([DateResolved])

Resolved within TurnAround time: =Count(IIf(DateDiff("d",
[DateReceived],[DateResolved])<=[TurnaroundDays],"Q"))

Percent Resolved within Turnaround Goal:=[txtQuick]/
[txtAccountsResolved]

Ignoring holidays, I think you can use the DatePart function
to determine the day of the week.

TurnaroundDays: =IIf(DatePart("w", DateReceived, 2)>3,4,2)
 

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

Similar Threads

if then statement 1
Help with if then statement 1
need help with if then 1
Counting Records in a date range 1
Report Query 1
Query Criteria 1
counting records in a date range 1
need another alternative for query 1

Top