Sumifs/contifs criteria across multiple columns

Mikeymike15

New Member
Joined
Jul 20, 2006
Messages
33
Good morning all,

I need some coding efficiency help here

I need to find a criteria across multiple columns (in this case "TF001")

A B
TF001 TF003
TF002 TF004
TF001 TF001

I've solved my problem using the formula below (essentially repeating a single column formula for each column I want to find the criteria, and then adding them together)

=COUNTIFS(dMod!$K$2:$K$675,"="&$C5,dMod!$G$2:$G$675,">="&H$3,dMod!$G$2:$G$675,"<"&I$3)+COUNTIFS(dMod!$L$2:$L$675,"="&$C5,dMod!$G$2:$G$675,">="&H$3,dMod!$G$2:$G$675,"<"&I$3)

There's gotta be something less redundant

I've tried to condense this array from $K$2:$K$675 to $K$2:$L$675 to clean up my formula but it returns a value #.

What trick am I missing. I read through about a dozen threads before I shot this new thread out.

Thanks,
Mike
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
Hi,

Perhaps something like this:

Code:
=SUMPRODUCT(
    (dMod!$K$2:$K$675 = $C5) + (dMod!$L$2:$L$675 = $C5),
    --(dMod!$G$2:$G$675 >= H$3),
    --(dMod!$G$2:$G$675 < I$3))

I haven't tested it properly so please check it does what you need.
 
Upvote 0

Forum statistics

Threads
1,214,429
Messages
6,119,433
Members
448,897
Latest member
ksjohnson1970

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