Sum product based on 2 values

Peter1973

Well-known Member
Joined
May 13, 2006
Messages
963
Office Version
  1. 365
I am trying to find a way to :

Look in A1:A100 for all cells that =FT/DR
Then in all those cells look in all the ones in B1:B100 that are between 00:00-08:00

Then in the cells that meets both criteria sum the ones with H in C1:C100

Any help appreciated
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
Do you mean count the rows that meet your criteria?
With the criteria in cells E1:H1

=sumproduct(--(a1:a100=e1),--(b1:b100 > f1),--(b1:b100 < g1),--(c1:c100=h1))

To sum the cells in B that meet your criteria

=SUMPRODUCT(--(A1:A100=E1),--(B1:B100 > F1),--(B1:B100 < G1),--(C1:C100=H1),(B1:B100))

Format the result to your preference.
 
Last edited:
Upvote 0
I had trouble with the Internet.

Do you mean count the rows that meet your criteria?
With the criteria in cells E1:H1

=SUMPRODUCT(--(A1:A100=E1),--(B1:B100 > F1),--(B1:B100 < G1),--(C1:C100=H1))

or to Sum the times in Column B

=SUMPRODUCT(--(A1:A100=E1),--(B1:B100 > F1),--(B1:B100 < G1),--(C1:C100=H1),(B1:B100))

N.B. format the the result to your preference.
You may require a custom format such as [h]:mm
 
Last edited:
Upvote 0
Soory may have not explained properly I mean sum the ones in C1:C100 which meet both criteria and have the letter H in them.
 
Upvote 0

Forum statistics

Threads
1,224,590
Messages
6,179,750
Members
452,940
Latest member
rootytrip

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