Performing a SUM within a COUNTIFS

mattadams84

Board Regular
Joined
Oct 30, 2016
Messages
54
I have a database in excel where columns hold lots of different pieces of data. On a different sheet I would like to be able to perform a SUM within a COUNTIFS statement.
The logic in my head is this, but obviously it does not work:

=COUNTIFS(DATABASE!$F:$F,$C3,(SUM(DATABASE!$H:$H+DATABASE!$I:$I)),">=2")

So here i am saying if in column F of the database the value is equal to what i have in cell C3 on my sheet, then i would like it, for each row where the value is what i have in C3, to add up the values between cells H and I.
 
Last edited:

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
I should be clearer : I am saying if in column F of the database the value is equal to what I have in cell C3 on my sheet, then I would like, for each row where the value is what I have in C3, to add up the values between cells H and I, and if that value is greater than 2 then count it, if not then do not count it.
 
Upvote 0
Dont exactly understand what you need but I think if you use an extra column or two you can get what you want. For example you probably need to use the first part with checking the f column as a check column
 
Upvote 0

Forum statistics

Threads
1,223,228
Messages
6,170,871
Members
452,363
Latest member
merico17

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
Back
Top