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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

sumif function..

Status
Not open for further replies.

OAKLEYS21

MIS
Jun 28, 2004
20
CA
Can someone tell me why this formula doesn't work?
=Sum(IIf([AccountName],"CURRENT PORTION - INV LEASES",[DepositAmount]))

Thanks
 
O,

Your formula needs an EXPERSSION that will return TRUE or FALSE...
[tt]
=Sum(IIf([AccountName],"CURRENT PORTION - INV LEASES",[DepositAmount]))
[/tt]

like...
[tt]
=Sum(IIf([AccountName]="Some Account Name","CURRENT PORTION - INV LEASES",[DepositAmount]))
[/tt]


Skip,

Want to get great answers to your Tek-Tips questions? Have a look at faq222-2244
 
Still didn't work?? what I want to do is total the values in the accounts with the same name. Any other ideas? thanks.
 
[tt]
Select AccountName, Sum(DepositAmount])
From MyTable
Group By AccountName
[/tt]
:)

Skip,

Want to get great answers to your Tek-Tips questions? Have a look at faq222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top