Sum if multiple condition

popac

New Member
Joined
Dec 5, 2005
Messages
2
I need help with a formula to calculate the sum of 20% of value in column F if the value in column E is 3 and the month in column C is Jan (resp. Feb Mar...). Sometimes the field in Column C is empty.
A B C D E F
1 01-Jan-05 3 $1500
2 05-Feb-05 3 $2500
3 02-Jan-05 2 $5000
4 09-Jan-05 3 $2000

When the value in column E is 2 I need to sum 30% of the value in F and check the month in column D.

Thank You
Cris
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)

iggydarsa

Well-known Member
Joined
Jun 28, 2005
Messages
1,647
A B C D E F
1 01-Jan-05 3 $1500
2 05-Feb-05 3 $2500
3 02-Jan-05 2 $5000
4 09-Jan-05 3 $2000

When the value in column E is 2 I need to sum 30% of the value in F and check the month in column D.

It looks like column D has prices in it, not the months
 
L

Legacy 51064

Guest
=SUMPRODUCT((B1:B100="JAN")*(E1:E100=3)*(F1:F100)*.2))
 

iggydarsa

Well-known Member
Joined
Jun 28, 2005
Messages
1,647
A B C D E F
1 01-Jan-05 3 $1500
2 05-Feb-05 3 $2500
3 02-Jan-05 2 $5000
4 09-Jan-05 3 $2000

When the value in column E is 2 I need to sum 30% of the value in F and check the month in column D.

It looks like column D has prices in it, not the months... or are you dividing the date into 3 columns? if not where are the info in E and F? Also, what should happen if the date is blank?
 
L

Legacy 51064

Guest
Sorry, I had an extra ")".



=SUMPRODUCT((B1:B100="JAN")*(E1:E100=3)*(F1:F100)*0.2)
 

Domenic

MrExcel MVP
Joined
Mar 10, 2004
Messages
20,224
Office Version
  1. 365
Platform
  1. Windows
If a cell in Column C is empty, I assume that corresponding value in Column F is also empty. If this is correct, try...

=SUMPRODUCT(--(TEXT(C1:C4,"mmm")=H1),--(E1:E4=I1),F1:F4)*J1

...where H1 contains your first criterion, such as Jan, I1 contains your second criterion, such as 3, and J1 contains your third criterion, such as 20%. Otherwise, try the following instead...

=SUMPRODUCT(--(C1:C4<>""),--(TEXT(C1:C4,"mmm")=H1),--(E1:E4=I1),F1:F4)*J1

Did you want to include the year as part of your criteria?
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,164,055
Messages
5,835,157
Members
430,342
Latest member
Sailingexcel

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
Top