Help with SUMIF's

ddub25

Well-known Member
Joined
Jan 11, 2007
Messages
625
Office Version
  1. 2019
Platform
  1. Windows
=SUMIFS($E$27:$E$38,$A$27:$A$38,$A$86,$B$27:$B$38,"Investor")

I would like to add a calculation for when the condition is not met. If the condition is not met then I want ($H$86*G91) to be calculated. Whatever I try the syntax is always wrong.

Dan
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
=if(SUMIFS($E$27:$E$38,$A$27:$A$38,$A$86,$B$27:$B$38,"Investor")=0,$H$86*G91,SUMIFS($E$27:$E$38,$A$27:$A$38,$A$86,$B$27:$B$38,"Investor")
 
Upvote 0
=SUMIFS($E$27:$E$38,$A$27:$A$38,$A$86,$B$27:$B$38,"Investor")

I would like to add a calculation for when the condition is not met. If the condition is not met then I want ($H$86*G91) to be calculated. Whatever I try the syntax is always wrong.

Dan
Which condition? There are 2 conditions in the formula:
  • A27:A38 = A86
  • B27:B38 = Investor
Also, these conditions are testing ranges of cells but ($H$86*G91) is just a single cell condition.

Or, do you mean if the entire formula returns 0 then execute ($H$86*G91) ?
 
Upvote 0
As in if the sumifs() returns a zero, you want this? Or the sum of those values that meet the conditions plus for each row where one of the conditions is not met, that row's value in column E would be replaced with $H$86 * G91? And does the G91 then correspond to row 27, i.e. G91:G102 really?

A couple of snapshots of sample data and desired outcome would go a long way to helping members help you.
 
Upvote 0
Thanks Moonfish, Valko and Greg. Sorry for the lack of explanation. I meant that if neither conditions were met then calculate ($H$86*G91). I've tried Moonfish's formula and that seems to do what I want. Thanks Moonfish.

Dan
 
Upvote 0

Forum statistics

Threads
1,224,520
Messages
6,179,270
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