Sum If on Report

G

Guest

I need a report to list the sum of Military and Non Military orders. The
Military orders are distinguished by having the name "GEORGIA PACIFIC CORP"
or "GEORGIS-PACIFIC CO". The sales information I need to total is in InvQty
field. Trying to create a SumIIf function to tell it to sum the InvQty field
if the Name field is either equal to "GEORGIA PACIFIC CORP" or
"GEORGIS-PACIFIC CO" for the Miltary Totals or not equal to those names for
the Non Military Totals. I tried using the SumIIf function below, but I get
the same totol for both functions. The totals it gives me is the total for
both military and non military together?


=Sum(IIf([Name]="GEORGIA PACIFIC CORP" Or "GEORGIS-PACIFIC CO",[InvQty],0))

=Sum(IIf([Name]<>"GEORGIA PACIFIC CORP" Or "GEORGIS-PACIFIC CO",[InvQty],0))
 
A

Al Camp

Supe,
Try...
=Sum(IIf([Name]="GEORGIA PACIFIC CORP" Or [Name] ="GEORGIS-PACIFIC CO",[InvQty],0))
 
G

Guest

That did it. Thanks.

Al Camp said:
Supe,
Try...
=Sum(IIf([Name]="GEORGIA PACIFIC CORP" Or [Name] ="GEORGIS-PACIFIC CO",[InvQty],0))
--
hth
Al Camp
Candia Computer Consulting - Candia NH
http://home.comcast.net/~cccsolutions


Supe said:
I need a report to list the sum of Military and Non Military orders. The
Military orders are distinguished by having the name "GEORGIA PACIFIC CORP"
or "GEORGIS-PACIFIC CO". The sales information I need to total is in InvQty
field. Trying to create a SumIIf function to tell it to sum the InvQty field
if the Name field is either equal to "GEORGIA PACIFIC CORP" or
"GEORGIS-PACIFIC CO" for the Miltary Totals or not equal to those names for
the Non Military Totals. I tried using the SumIIf function below, but I get
the same totol for both functions. The totals it gives me is the total for
both military and non military together?


=Sum(IIf([Name]="GEORGIA PACIFIC CORP" Or "GEORGIS-PACIFIC CO",[InvQty],0))

=Sum(IIf([Name]<>"GEORGIA PACIFIC CORP" Or "GEORGIS-PACIFIC CO",[InvQty],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