Counting/Summing with an if statement

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a report based off a query. The query is giving me all the sales for
each person in my group. Column 1 has the individuals name ( John, Matt,
etc.), Column 2 has the type of product (Access, DSL, LD), Columns 3, 4, 5, &
6 has the number of lines sold to the customer. What I would like is If
Column 1 = "John" & Column 2 = "Access", Sum Columns 3,4,5, & 6. Right now
it's currently summing the whole table, and I want it to just sum for these
people.

Any help would be appreciated.
 
If I understand you correctly, you could use something like:
=Sum( Abs([Column1]="John" & [Column2] = "Access") * ([Column3] + [Column4]
+ [Column5] + [Column6] ) )

Summing across columns raises a red flag regarding normalization. I trust
you understand your tables better than I do....
 
Back
Top