Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Complex If statement

Status
Not open for further replies.

buckeye77

Technical User
Jul 21, 2008
29
US
The current if statment is in the form footer and works great...
=Sum(IIf([CalandarYear]=2008,[AdvanceAmt],0))

However as with everything, someone has thrown in a wrench...

The issue is that another field [RepaymentAmt] has been added in the event the entire advance is not cleared. [RepaymentAmt] = [AdvanceAmt]-[HRAdvanceClrd]


The formula needs to be:
=Sum(IIf([CalandarYear]=2008,[AdvanceAmt],0))
if
1) Field [Grades] is null
&
2) Field [HRAdvanceClrd] = 0 (Which is default until HR sees the Grades... basically you pass and they fill in the clrd field with the advanceamt)

Otherwise the formula needs to be
=Sum(IIf([CalandarYear]=2008,[HRAdvanceClrd],0))


Any suggestions? This is outside my knowledge.....
 
=Sum(IIf([CalandarYear]=2008,IIf([Grades] Is Null AND [HRAdvanceClrd]=0,[AdvanceAmt],[HRAdvanceClrd]),0))

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Other than finding that I needed to take out the grade portion (found that the "grades" part just makes the "scheme" not work for what I need).. the formula works great! thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top