Formulas for counting and summing

jcowans

New Member
Joined
Sep 5, 2002
Messages
3
Need two formulas. #1-counts all "2002" transactions (A:A) that are aged "0-30"(B:B). #2-sum total dollar values (C:C) of all transaction from formula #1.

FY Full Age Amount
2002 0-30 $100.00
2002 0-30 35.00
2001 61-90 25.00
2001 0-30 354.00
2000 >365 125.00

For 2002 transactions aged 0-30, results should be :
2002=2
Age sum= $135.00
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple

Aladin Akyurek

MrExcel MVP
Joined
Feb 14, 2002
Messages
85,210
On 2002-09-06 18:34, jcowans wrote:
Need two formulas. #1-counts all "2002" transactions (A:A) that are aged "0-30"(B:B). #2-sum total dollar values (C:C) of all transaction from formula #1.

FY Full Age Amount
2002 0-30 $100.00
2002 0-30 35.00
2001 61-90 25.00
2001 0-30 354.00
2000 >365 125.00

For 2002 transactions aged 0-30, results should be :
2002=2
Age sum= $135.00

Let A2:C6 house the sample exclusing the labels.

To get the desired count:

=SUMPRODUCT(($A$2:$A$6=E1)*($B$2:$B$6=F1))

where E1 houses a condition like 2002 and F1 a condition like 0-30.

To get the desired sum:

=SUMPRODUCT(($A$2:$A$6=E1)*($B$2:$B$6=F1),$C$2:$C$6)

for the same conditions as for the counting.

You might also want to consider a pivot table from your data to obtain the same results.
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,164,489
Messages
5,837,630
Members
430,506
Latest member
TonyIbbs

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top