to find the sum of rows on multiple condition

klnp_mysore

Board Regular
Joined
Mar 2, 2011
Messages
64
Hi,
I have two work sheets. Sheet1 and Sheet2.

Sheet1
Col A Col B Col C Col D
aaa-1 abc 2000
aaa-2 abc 500
aaa-3 abc
bbb-1 xyz 1000
bbb-2 xyz
bbb-3 xyz

Sheet 2
Col A Col B Col C Col D
aaa-1 abc Main 1000
aaa-1 abc Main 1000
aaa-2 abc Neu 500
bbb-1 xyz Main 1000

I want to find the sum in sheet 1 if row aaa-1 in sheet1 and aaa-1 in sheet 2 are equal and col C is Main
Please help me

Regards
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
Hi,


Excel Workbook
ABCD
1Data1Data2Data3Data4
2aaa-1abcmain1000
3aaa-1abcmain1000
4aaa-1abcneu500
5bbb-1xyzmain1000
Sheet2




Excel Workbook
ABCD
1Data1Data2Data3MAIN
2aaa-1abc2000*
3aaa-2abc0*
4aaa-3abc0*
5bbb-1xyz1000*
6bbb-2xyz0*
7bbb-3xyz0*
Sheet1


Or Excel 2007....

Excel Workbook
ABCD
1Data1Data2Data3MAIN
2aaa-1abc2000*
3aaa-2abc0*
4aaa-3abc0*
5bbb-1xyz1000*
6bbb-2xyz0*
7bbb-3xyz0*
Sheet1


You could use...

=SUMPRODUCT((Sheet2!$A$2:$A$5=A2)*(Sheet2!$C$2:$C$5="main")*(Sheet2!$D$2:$D$5))

=SUMIFS(Sheet2!$D$2:$D$5,Sheet2!$A$2:$A$5,A2,Sheet2!$C$2:$C$5,"main")

Does that work for you?

Ak
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,521
Messages
6,179,285
Members
452,902
Latest member
Knuddeluff

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