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

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
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,903
Messages
6,175,289
Members
452,631
Latest member
a_potato

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