Sum if some condition match

Vishaal

Well-known Member
Joined
Mar 16, 2019
Messages
533
Office Version
  1. 2010
  2. 2007
Platform
  1. Windows
  2. Web
Hi All,

We have the following sheets

Sheet1
Example (2).xlsx
ABCDE
1d & TNameOTNEWP/l
22/20/2018 0:38:52Tom Van524665214258
32/26/2018 16:47:52652302547
Sheet1


Sheet2
Example (2).xlsx
ABC
102-20-2018
2Tom VanTest 1pass
3Test 2o.k.
4Test 3
5Test 4
6Test 5
Sheet2


we want the following result
if Sheet2!A2 will match Sheet1!B2:B3 and Sheet2!C1 date will match Sheet1!A2:A3 then we will get the sum of Sheet1!C2+D2
if Sheet2!A2 will match Sheet1!B2:B3 and Sheet2!C1 date will match Sheet1!A2:A3 then we will get the sum of Sheet1!E2
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
Try:

Book2
ABCDE
12/20/2018Sum of C/DSum of E
2Tom VanTest 1pass70460258
3Test 2o.k.
4Test 3
5Test 4
6Test 5
Sheet2
Cell Formulas
RangeFormula
D2D2=SUMPRODUCT(Sheet1!$C$2:$D$5*(INT(Sheet1!$A$2:$A$5)=INT(C1))*(Sheet1!$B$2:$B$5=A2))
E2E2=SUMPRODUCT(Sheet1!$E$2:$E$5*(INT(Sheet1!$A$2:$A$5)=INT(C1))*(Sheet1!$B$2:$B$5=A2))
 
Upvote 0
Thanks for your help Eric W

but its not working

pls check

Sheet1
Example.xlsx
ABCDE
1d & TNameOTNEWP/l
22/20/2018 0:38:52Tom Van524665214258
32/26/2018 16:47:52652302547
Sheet1


Result Sheet after using your formula in D2 & E2
Example.xlsx
ABCDE
102-20-2018
2Tom VanTest 1pass#VALUE!#VALUE!
3Test 2o.k.
4Test 3
5Test 4
6Test 5
Sheet2


help pls
 
Upvote 0
yes Wric W ji

its work for me thanks for your help
 
Upvote 0

Forum statistics

Threads
1,214,606
Messages
6,120,488
Members
448,967
Latest member
visheshkotha

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